<html>
<head><meta charset="utf-8"><title>adding context to `TypeFamily` chalk#328 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html">adding context to `TypeFamily` chalk#328</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="188236674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188236674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188236674">(Feb 14 2020 at 19:15)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="220273">@Jane Lusby</span>  -- are you still looking for a task to take on?</p>



<a name="188236677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188236677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188236677">(Feb 14 2020 at 19:15)</a>:</h4>
<p>I got one for ya :)</p>



<a name="188236988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188236988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188236988">(Feb 14 2020 at 19:19)</a>:</h4>
<p>On this topic, should I create a chalk issue or something?</p>



<a name="188236993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188236993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188236993">(Feb 14 2020 at 19:19)</a>:</h4>
<p>With some mentoring notes?</p>



<a name="188236995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188236995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188236995">(Feb 14 2020 at 19:19)</a>:</h4>
<p>I guess I will</p>



<a name="188237034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237034">(Feb 14 2020 at 19:19)</a>:</h4>
<p>oh you literally beat me to it, lol</p>



<a name="188237036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237036">(Feb 14 2020 at 19:19)</a>:</h4>
<p>That's probably easiest</p>



<a name="188237108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237108">(Feb 14 2020 at 19:20)</a>:</h4>
<p>give me a few minutes</p>



<a name="188237112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237112">(Feb 14 2020 at 19:20)</a>:</h4>
<p>A chalk issue with mentoring notes would be best, yes, ty <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="188237613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237613">(Feb 14 2020 at 19:24)</a>:</h4>
<p>Ah, this raises an important question :)</p>



<a name="188237626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237626">(Feb 14 2020 at 19:25)</a>:</h4>
<p>Right now, we use the name <code>TypeFamily</code></p>



<a name="188237653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237653">(Feb 14 2020 at 19:25)</a>:</h4>
<p>We've been talking about renaming that to <code>TypeInterner</code> or maybe <code>TypeContext</code></p>



<a name="188237699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237699">(Feb 14 2020 at 19:25)</a>:</h4>
<p>The task here is going to involve threading around local variables, so we go from</p>
<div class="codehilite"><pre><span></span>fn foo&lt;TF: TypeFamily&gt;()
</pre></div>


<p>to </p>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="n">TF</span>: <span class="nc">TypeFamily</span><span class="o">&gt;</span><span class="p">(</span><span class="n">tf</span>: <span class="kp">&amp;</span><span class="nc">TF</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188237712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237712">(Feb 14 2020 at 19:26)</a>:</h4>
<p>it seems good to decide what the name of this local variable should be</p>



<a name="188237754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237754">(Feb 14 2020 at 19:26)</a>:</h4>
<p><code>tf</code> .. doesn't strike me as ideal</p>



<a name="188237770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237770">(Feb 14 2020 at 19:26)</a>:</h4>
<p><code>interner: &amp;TypeInterner</code> is maybe good, if a bit long</p>



<a name="188237786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237786">(Feb 14 2020 at 19:26)</a>:</h4>
<p><code>tcx: &amp;TypeContext</code> is very rustc-like, but <code>tcx</code> has been confusing there to new folks for some time</p>



<a name="188237825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237825">(Feb 14 2020 at 19:26)</a>:</h4>
<p>either that or passing the context as an argument into the functions</p>



<a name="188237861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237861">(Feb 14 2020 at 19:27)</a>:</h4>
<p>I don't get it :)</p>



<a name="188237876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237876">(Feb 14 2020 at 19:27)</a>:</h4>
<p>that is, that sounds like what I wrote</p>



<a name="188237894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237894">(Feb 14 2020 at 19:27)</a>:</h4>
<p>oh, one sec</p>



<a name="188237961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188237961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188237961">(Feb 14 2020 at 19:28)</a>:</h4>
<p>BTW, filed <a href="https://github.com/rust-lang-nursery/chalk/issues/328" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/328">chalk#328</a></p>



<a name="188238021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238021">(Feb 14 2020 at 19:28)</a>:</h4>
<p>I mean, so instead of <code>intern_ty(ty: TyData&lt;Self&gt;)</code> it could be instead <code>intern_ty(ctx: Context, ty: TyData&lt;Self&gt;)</code></p>



<a name="188238026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238026">(Feb 14 2020 at 19:28)</a>:</h4>
<p>and so on</p>



<a name="188238044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238044">(Feb 14 2020 at 19:29)</a>:</h4>
<p>I expected</p>



<a name="188238060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238060">(Feb 14 2020 at 19:29)</a>:</h4>
<p><code>fn intern_ty(&amp;self, ty: TyData&lt;Self&gt;) -&gt; Ty&lt;Self&gt;</code></p>



<a name="188238069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238069">(Feb 14 2020 at 19:29)</a>:</h4>
<p>but you could do</p>



<a name="188238083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238083">(Feb 14 2020 at 19:29)</a>:</h4>
<p><code>fn intern_ty(cx: Self::Context, ty: TyData&lt;Self&gt;) -&gt; Ty&lt;Self&gt;</code></p>



<a name="188238092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238092">(Feb 14 2020 at 19:29)</a>:</h4>
<p>which is perhaps what you mean</p>



<a name="188238113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238113">(Feb 14 2020 at 19:29)</a>:</h4>
<blockquote>
<p>BTW, filed <a href="https://github.com/rust-lang-nursery/chalk/issues/328" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/328">chalk#328</a></p>
</blockquote>
<p>I intentionally left this quite minimal while we hammer out the destination</p>



<a name="188238189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238189">(Feb 14 2020 at 19:30)</a>:</h4>
<p>I don't have a strong opinion about <code>&amp;self</code> vs <code>Self::Context</code> except that <code>&amp;self</code> feels slightly simpler</p>



<a name="188238194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238194">(Feb 14 2020 at 19:30)</a>:</h4>
<p>in particular</p>



<a name="188238204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238204">(Feb 14 2020 at 19:30)</a>:</h4>
<p>if you have <code>fn foo&lt;TF&gt;(interner: &amp;TF, ...)</code>, and you call it like <code>foo(interner, ...)</code></p>



<a name="188238213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238213">(Feb 14 2020 at 19:30)</a>:</h4>
<p>then the value of <code>TF</code> can be inferred from the argument</p>



<a name="188238241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238241">(Feb 14 2020 at 19:31)</a>:</h4>
<p>in contrast, today (and with the associated type design), you might sometimes need to do <code>foo::&lt;TF&gt;(...)</code> to explicitly specify <code>TF</code></p>



<a name="188238283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238283">(Feb 14 2020 at 19:31)</a>:</h4>
<p>since if you have <code>fn foo&lt;TF&gt;(interner: &amp;TF::Interner, ..)</code>  then the type of the argument doesn't really tell you what <code>TF</code> is, only what its interner is</p>



<a name="188238377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238377">(Feb 14 2020 at 19:32)</a>:</h4>
<p>I don't know which way would be better</p>



<a name="188238712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238712">(Feb 14 2020 at 19:35)</a>:</h4>
<p>I don't know for sure either, I'd be inclined to start with <code>&amp;self</code> and see if we hit some problems</p>



<a name="188238724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238724">(Feb 14 2020 at 19:36)</a>:</h4>
<p>(for the reasons I gave)</p>



<a name="188238834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238834">(Feb 14 2020 at 19:37)</a>:</h4>
<p>Either way, I actually think this is <em>probably</em> a blocker for integrating chalk-solve/chalk-ir into rustc</p>



<a name="188238874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238874">(Feb 14 2020 at 19:37)</a>:</h4>
<p>Yes, I expect so</p>



<a name="188238972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188238972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188238972">(Feb 14 2020 at 19:38)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/issues/328#issuecomment-586443051" target="_blank" title="https://github.com/rust-lang/chalk/issues/328#issuecomment-586443051">see comment</a></p>



<a name="188239004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239004">(Feb 14 2020 at 19:39)</a>:</h4>
<p>I'm trying to decide if there is some "trick" to going about this. I think I would probably just add the <code>&amp;self</code> and start running <code>cargo check --all</code></p>



<a name="188239020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239020">(Feb 14 2020 at 19:39)</a>:</h4>
<p>I'm wondering if this is a good "starting issue" or not. It's going to be some work, that's for sure.</p>



<a name="188239056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239056">(Feb 14 2020 at 19:39)</a>:</h4>
<p>OTOH, it's the kind of bug where you just get it to compile, and things should "just work"</p>



<a name="188239117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239117">(Feb 14 2020 at 19:40)</a>:</h4>
<p>there will be a few things that need to be refactored, e.g. I think we have some <code>FromIterator</code> impls that invoke <code>TF::intern</code> and those won't work</p>



<a name="188239125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239125">(Feb 14 2020 at 19:40)</a>:</h4>
<p>I mean, <code>self.data()</code> is called in a bunch of places in debug, to start</p>



<a name="188239147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239147">(Feb 14 2020 at 19:40)</a>:</h4>
<p>note that I did not modify <code>data</code></p>



<a name="188239151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239151">(Feb 14 2020 at 19:40)</a>:</h4>
<p>(yet) :)</p>



<a name="188239166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239166">(Feb 14 2020 at 19:40)</a>:</h4>
<p>but yeah, you're right, we should discus how we'll solve that</p>



<a name="188239180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239180">(Feb 14 2020 at 19:40)</a>:</h4>
<p>in rustc we use thread-local data to get the tcx</p>



<a name="188239242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239242">(Feb 14 2020 at 19:41)</a>:</h4>
<p>debug already uses tls in some places</p>



<a name="188239255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239255">(Feb 14 2020 at 19:41)</a>:</h4>
<p>yes</p>



<a name="188239260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239260">(Feb 14 2020 at 19:41)</a>:</h4>
<p>in slightly different way</p>



<a name="188239261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239261">(Feb 14 2020 at 19:41)</a>:</h4>
<p>so that's not too strange</p>



<a name="188239272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239272">(Feb 14 2020 at 19:41)</a>:</h4>
<p>but it could proabbly be adapted to this purpose</p>



<a name="188239279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239279">(Feb 14 2020 at 19:41)</a>:</h4>
<p>it'd just become more imporant than ever :)</p>



<a name="188239293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239293">(Feb 14 2020 at 19:41)</a>:</h4>
<p>i.e., right now you get "kinda usable" debug output without good TLS</p>



<a name="188239298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239298">(Feb 14 2020 at 19:41)</a>:</h4>
<p>but it would become quite less</p>



<a name="188239315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239315">(Feb 14 2020 at 19:41)</a>:</h4>
<p>okay, its good to know this is a blocker for other stuff on integration</p>



<a name="188239383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239383">(Feb 14 2020 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I'm going to spend a bit of time enumerating a coupel of other concrete steps, but I definitely think this is one we should try to do this sprint, whether it be you or someone else (maybe me...)</p>



<a name="188239404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239404">(Feb 14 2020 at 19:42)</a>:</h4>
<p>okay</p>



<a name="188239417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239417">(Feb 14 2020 at 19:42)</a>:</h4>
<p>I'm definitely gonna try to do it</p>



<a name="188239425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239425">(Feb 14 2020 at 19:42)</a>:</h4>
<p>ok great!</p>



<a name="188239436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239436">(Feb 14 2020 at 19:42)</a>:</h4>
<p>ill let you know quickly if I feel like im spining my wheels though</p>



<a name="188239449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239449">(Feb 14 2020 at 19:42)</a>:</h4>
<p>Or (and I don't know how feasible this is), but don't have <code>Ty</code> (and others) implement <code>Debug</code>, only <code>TyData</code></p>



<a name="188239453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239453">(Feb 14 2020 at 19:42)</a>:</h4>
<p>one thing we can do if you want</p>



<a name="188239490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239490">(Feb 14 2020 at 19:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188239449" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188239449">said</a>:</p>
<blockquote>
<p>Or (and I don't know how feasible this is), but don't have <code>Ty</code> (and others) implement <code>Debug</code>, only <code>TyData</code></p>
</blockquote>
<p>maybe we should spin the "debug" conversation to a side topic</p>



<a name="188239511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239511">(Feb 14 2020 at 19:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188239453" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188239453">said</a>:</p>
<blockquote>
<p>one thing we can do if you want</p>
</blockquote>
<p>I was going to say, <span class="user-mention" data-user-id="220273">@Jane Lusby</span>, if you want we could try a "pair session" to get started</p>



<a name="188239517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239517">(Feb 14 2020 at 19:43)</a>:</h4>
<p>sometimes that's useful</p>



<a name="188239531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239531">(Feb 14 2020 at 19:43)</a>:</h4>
<p>maybe, but I think it is slightly relevant</p>



<a name="188239562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239562">(Feb 14 2020 at 19:43)</a>:</h4>
<p>but we can hold for another time :)</p>



<a name="188239572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239572">(Feb 14 2020 at 19:44)</a>:</h4>
<p>they are related, but (a) I don't think this step depends on it and (b) we have to do this change, it's not like it's optional</p>



<a name="188239635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239635">(Feb 14 2020 at 19:44)</a>:</h4>
<p>whats your availability look like <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ?</p>



<a name="188239658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239658">(Feb 14 2020 at 19:44)</a>:</h4>
<p>this afternoon I'm available; next week would be harder. I've blocked out mondays/fridays in general though</p>



<a name="188239667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239667">(Feb 14 2020 at 19:44)</a>:</h4>
<p>okay</p>



<a name="188239695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239695">(Feb 14 2020 at 19:45)</a>:</h4>
<p>next week I'm on vacation mon/fri is part of the problem :) but I'll be around tue-thu in the mornings (but I think you are on west coast US?)</p>



<a name="188239717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239717">(Feb 14 2020 at 19:45)</a>:</h4>
<p>im at work until 5pm pst so I cant do any voice chat things until then</p>



<a name="188239723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239723">(Feb 14 2020 at 19:45)</a>:</h4>
<p>yea</p>



<a name="188239726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239726">(Feb 14 2020 at 19:45)</a>:</h4>
<p>west coast</p>



<a name="188239746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239746">(Feb 14 2020 at 19:45)</a>:</h4>
<p>tues and thurs are good for me because I'm wfh and often not busy</p>



<a name="188239806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239806">(Feb 14 2020 at 19:46)</a>:</h4>
<p>I'm gonna attempt to start on this without the pair programming but ill msg you this afternoon if I feel like it would help</p>



<a name="188239811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188239811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188239811">(Feb 14 2020 at 19:46)</a>:</h4>
<p>Sounds good</p>



<a name="188241457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241457">(Feb 14 2020 at 20:05)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188237653" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188237653">said</a>:</p>
<blockquote>
<p>We've been talking about renaming that to <code>TypeInterner</code> or maybe <code>TypeContext</code></p>
</blockquote>
<p>Fwiw, interner gets the meaning across best for me, and is the only one that I think makes it obvious what its doing, so I vote for this over tf or tcx, even if <code>interner</code> is longer to write, its not that long &gt;_&gt;</p>



<a name="188241681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241681">(Feb 14 2020 at 20:08)</a>:</h4>
<p>also</p>



<a name="188241685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241685">(Feb 14 2020 at 20:08)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">TF</span>: <span class="nc">TypeFamily</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">TF</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">new</span><span class="p">(</span><span class="n">data</span>: <span class="nc">impl</span><span class="w"> </span><span class="n">CastTo</span><span class="o">&lt;</span><span class="n">TyData</span><span class="o">&lt;</span><span class="n">TF</span><span class="o">&gt;&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">Ty</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">interned</span>: <span class="nc">TF</span>::<span class="n">intern_ty</span><span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">cast</span><span class="p">()),</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188241701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241701">(Feb 14 2020 at 20:08)</a>:</h4>
<p>presumably this requires I construct an instance of the TF, should I add a <code>TF: Default</code> bound here?</p>



<a name="188241718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241718">(Feb 14 2020 at 20:09)</a>:</h4>
<p>or is this gonna pass in a TF as self also</p>



<a name="188241724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241724">(Feb 14 2020 at 20:09)</a>:</h4>
<p>or not self, just an arg</p>



<a name="188241835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241835">(Feb 14 2020 at 20:10)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> you want to pass in an instance of <code>TF</code></p>



<a name="188241848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241848">(Feb 14 2020 at 20:10)</a>:</h4>
<p>at least in the chalk-ir code, you will <em>never</em> create one, always be given it</p>



<a name="188241860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241860">(Feb 14 2020 at 20:10)</a>:</h4>
<p>okay</p>



<a name="188241865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241865">(Feb 14 2020 at 20:10)</a>:</h4>
<p>this is precisely the kind of pattern where we cheated a bit out of convenience :)</p>



<a name="188241889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241889">(Feb 14 2020 at 20:11)</a>:</h4>
<p>feel free, if you think it would be nicer, to experiment with changing patterns here and there</p>



<a name="188241900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241900">(Feb 14 2020 at 20:11)</a>:</h4>
<p>e.g., to make <code>interner.new_ty(data)</code> instead of <code>Ty::new(interner, data)</code> or something</p>



<a name="188241903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241903">(Feb 14 2020 at 20:11)</a>:</h4>
<p>although that particular thing doesn't look better to me</p>



<a name="188241908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241908">(Feb 14 2020 at 20:11)</a>:</h4>
<p>i would rather get more familiar with the codebase before I try to make decisions about what patterns to use</p>



<a name="188241915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241915">(Feb 14 2020 at 20:11)</a>:</h4>
<p>yeah</p>



<a name="188241930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241930">(Feb 14 2020 at 20:11)</a>:</h4>
<p>im going to go ahead and rename TF to interner everywhere as I'm moving along</p>



<a name="188241942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241942">(Feb 14 2020 at 20:11)</a>:</h4>
<p>the main thing I'm concerned about is I <em>think</em> there are some cases where we use <code>FromIterator</code> and <code>collect</code> and that will <em>have</em> to be rewritten</p>



<a name="188241944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241944">(Feb 14 2020 at 20:12)</a>:</h4>
<p>what should the parameter for generics be</p>



<a name="188241982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241982">(Feb 14 2020 at 20:12)</a>:</h4>
<p>just <code>I</code>?</p>



<a name="188241986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241986">(Feb 14 2020 at 20:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188241930" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188241930">said</a>:</p>
<blockquote>
<p>im going to go ahead and rename TF to interner everywhere as I'm moving along</p>
</blockquote>
<p>maybe we should just do this as a first PR</p>



<a name="188241991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241991">(Feb 14 2020 at 20:12)</a>:</h4>
<p>before anything else</p>



<a name="188241992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241992">(Feb 14 2020 at 20:12)</a>:</h4>
<p>okay</p>



<a name="188241993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241993">(Feb 14 2020 at 20:12)</a>:</h4>
<p>I would definitely recommend that</p>



<a name="188241995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241995">(Feb 14 2020 at 20:12)</a>:</h4>
<p>that sounds good</p>



<a name="188241997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188241997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188241997">(Feb 14 2020 at 20:12)</a>:</h4>
<p>okay</p>



<a name="188242005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242005">(Feb 14 2020 at 20:12)</a>:</h4>
<p>otherwise you'll get trippe up in rebasing hell or something</p>



<a name="188242019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242019">(Feb 14 2020 at 20:12)</a>:</h4>
<p>as far as the initials..</p>



<a name="188242030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242030">(Feb 14 2020 at 20:12)</a>:</h4>
<p>should it be <code>Interner</code> or <code>TypeInterner</code></p>



<a name="188242033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242033">(Feb 14 2020 at 20:12)</a>:</h4>
<p>I guess it interns more than types</p>



<a name="188242040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242040">(Feb 14 2020 at 20:13)</a>:</h4>
<p>maybe <code>I: Interner</code> is kind of nice, actually</p>



<a name="188242046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242046">(Feb 14 2020 at 20:13)</a>:</h4>
<p>simple</p>



<a name="188242058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242058">(Feb 14 2020 at 20:13)</a>:</h4>
<p>or actually</p>



<a name="188242061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242061">(Feb 14 2020 at 20:13)</a>:</h4>
<p>one thing is that there is also <code>TargetTypeFamily</code>, but <code>TargetInterner</code> is ok</p>



<a name="188242064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242064">(Feb 14 2020 at 20:13)</a>:</h4>
<p><code>TI</code>?</p>



<a name="188242082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242082">(Feb 14 2020 at 20:13)</a>:</h4>
<p>okay</p>



<a name="188242084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242084">(Feb 14 2020 at 20:13)</a>:</h4>
<p>i</p>



<a name="188242088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242088">(Feb 14 2020 at 20:13)</a>:</h4>
<p>I and Interner</p>



<a name="188242108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242108">(Feb 14 2020 at 20:13)</a>:</h4>
<p>I could go either way but I'm kind of leaning towards "less is more"</p>



<a name="188242189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242189">(Feb 14 2020 at 20:14)</a>:</h4>
<p>We should avoid TI for Interner, because that gets confusing for TargetInterner (TTI?)</p>



<a name="188242237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242237">(Feb 14 2020 at 20:15)</a>:</h4>
<p>its colliding with a few I: IntoIterator calls</p>



<a name="188242255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242255">(Feb 14 2020 at 20:15)</a>:</h4>
<p>i guess ill make those II</p>



<a name="188242260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242260">(Feb 14 2020 at 20:15)</a>:</h4>
<p>this is fine</p>



<a name="188242315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242315">(Feb 14 2020 at 20:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188242189" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188242189">said</a>:</p>
<blockquote>
<p>We should avoid TI for Interner, because that gets confusing for TargetInterner (TTI?)</p>
</blockquote>
<p>I think it should be <code>I: Interner</code> or <code>TI: TypeInterner</code></p>



<a name="188242362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188242362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188242362">(Feb 14 2020 at 20:17)</a>:</h4>
<p>i went with I: Interner</p>



<a name="188243216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243216">(Feb 14 2020 at 20:27)</a>:</h4>
<p>this is a very large change...</p>



<a name="188243237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243237">(Feb 14 2020 at 20:27)</a>:</h4>
<p>yeah it's gonna be a pain</p>



<a name="188243250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243250">(Feb 14 2020 at 20:27)</a>:</h4>
<p>/me worried that every existing pr is gonna explode</p>



<a name="188243255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243255">(Feb 14 2020 at 20:27)</a>:</h4>
<p>this is why I'm wondering if I should find you something smaller to start with :)</p>



<a name="188243259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243259">(Feb 14 2020 at 20:27)</a>:</h4>
<p>oh well you're jus doing the rename now</p>



<a name="188243260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243260">(Feb 14 2020 at 20:28)</a>:</h4>
<p>that's not so bad</p>



<a name="188243263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243263">(Feb 14 2020 at 20:28)</a>:</h4>
<p>yea</p>



<a name="188243264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243264">(Feb 14 2020 at 20:28)</a>:</h4>
<p>:P</p>



<a name="188243317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243317">(Feb 14 2020 at 20:28)</a>:</h4>
<p>just wait till you see the PR</p>



<a name="188243320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243320">(Feb 14 2020 at 20:28)</a>:</h4>
<p>it'll touch a lot of files ...</p>



<a name="188243324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243324">(Feb 14 2020 at 20:28)</a>:</h4>
<p>i may have gone overboard</p>



<a name="188243356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243356">(Feb 14 2020 at 20:28)</a>:</h4>
<p>Nah it'll be fine, all open PRs just have to rebase</p>



<a name="188243387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243387">(Feb 14 2020 at 20:29)</a>:</h4>
<p>it's fine. you'll just RUIN EVERYONE'S WORK</p>



<a name="188243400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243400">(Feb 14 2020 at 20:29)</a>:</h4>
<p>:P</p>



<a name="188243414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243414">(Feb 14 2020 at 20:29)</a>:</h4>
<p>(and we'll be grateful for it)</p>



<a name="188243949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243949">(Feb 14 2020 at 20:35)</a>:</h4>
<p><a href="/user_uploads/4715/mtB8LfnS5N3SHrFa21ZdTFVz/Screenshot-from-2020-02-14-12-35-23.png" target="_blank" title="Screenshot-from-2020-02-14-12-35-23.png">Screenshot-from-2020-02-14-12-35-23.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/mtB8LfnS5N3SHrFa21ZdTFVz/Screenshot-from-2020-02-14-12-35-23.png" target="_blank" title="Screenshot-from-2020-02-14-12-35-23.png"><img src="/user_uploads/4715/mtB8LfnS5N3SHrFa21ZdTFVz/Screenshot-from-2020-02-14-12-35-23.png"></a></div>



<a name="188243957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188243957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188243957">(Feb 14 2020 at 20:35)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/329/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/329/files">https://github.com/rust-lang/chalk/pull/329/files</a></p>



<a name="188244020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244020">(Feb 14 2020 at 20:36)</a>:</h4>
<p>welp</p>



<a name="188244024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244024">(Feb 14 2020 at 20:36)</a>:</h4>
<p>i did the easy part</p>



<a name="188244037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244037">(Feb 14 2020 at 20:36)</a>:</h4>
<p>yall have fun with the merge conflicts</p>



<a name="188244039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244039">(Feb 14 2020 at 20:36)</a>:</h4>
<p>looool</p>



<a name="188244134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244134">(Feb 14 2020 at 20:37)</a>:</h4>
<p>You missed some <code>_TTF</code>'s</p>



<a name="188244191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244191">(Feb 14 2020 at 20:38)</a>:</h4>
<p>aah, tyty</p>



<a name="188244274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188244274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188244274">(Feb 14 2020 at 20:39)</a>:</h4>
<p>fixed</p>



<a name="188246932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188246932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188246932">(Feb 14 2020 at 21:08)</a>:</h4>
<p>so I can just slap interner variables into every fn here but I'm not sure if that should be done so I'm gonna put function signatures that I'm adding interner to here for double checking</p>



<a name="188246949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188246949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188246949">(Feb 14 2020 at 21:08)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">TyData</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">intern</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">I</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">Ty</span>::<span class="n">new</span><span class="p">(</span><span class="n">interner</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188247045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188247045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188247045">(Feb 14 2020 at 21:09)</a>:</h4>
<p>this leaked into this, but im not sure i should be adding interner to the fn sig here on this <code>Folder</code> trait</p>



<a name="188247049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188247049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188247049">(Feb 14 2020 at 21:09)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">fold_free_var_ty</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">depth</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">TI</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">forbid_free_vars</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">panic</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;unexpected free variable with depth `{:?}`&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">depth</span><span class="p">)</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="nb">Ok</span><span class="p">(</span><span class="n">TyData</span>::<span class="o">&lt;</span><span class="n">TI</span><span class="o">&gt;</span>::<span class="n">BoundVar</span><span class="p">(</span><span class="n">depth</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">binders</span><span class="p">).</span><span class="n">intern</span><span class="p">())</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188247303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188247303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188247303">(Feb 14 2020 at 21:11)</a>:</h4>
<p>going ahead with adding interner to both, and I've decided to prefer having <code>interner</code> before other args other than self</p>



<a name="188248412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248412">(Feb 14 2020 at 21:24)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> for folders</p>



<a name="188248434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248434">(Feb 14 2020 at 21:24)</a>:</h4>
<p>I think that the <code>Folder</code> needs a <code>fn interner(&amp;self) -&gt; &amp;I</code> function</p>



<a name="188248451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248451">(Feb 14 2020 at 21:24)</a>:</h4>
<p>and probably a <code>fn target_interner(&amp;self) -&gt; &amp;TI</code> function as well</p>



<a name="188248461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248461">(Feb 14 2020 at 21:25)</a>:</h4>
<p>I guess, in your PR, probably only the latter</p>



<a name="188248474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248474">(Feb 14 2020 at 21:25)</a>:</h4>
<p>aaaah</p>



<a name="188248477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248477">(Feb 14 2020 at 21:25)</a>:</h4>
<p>that way, the <code>fold</code> methods can use <code>folder.target_interner()</code></p>



<a name="188248479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248479">(Feb 14 2020 at 21:25)</a>:</h4>
<p>yea i'd just been doing</p>



<a name="188248488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248488">(Feb 14 2020 at 21:25)</a>:</h4>
<p>interner: &amp;TI, everywhere</p>



<a name="188248503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248503">(Feb 14 2020 at 21:25)</a>:</h4>
<p>and sometimes it wasnt obvious based on the usage</p>



<a name="188248506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248506">(Feb 14 2020 at 21:25)</a>:</h4>
<p>which one would be needed</p>



<a name="188248513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248513">(Feb 14 2020 at 21:25)</a>:</h4>
<p>sorry, should have had Zulip on my screen</p>



<a name="188248529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188248529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188248529">(Feb 14 2020 at 21:25)</a>:</h4>
<p>its okay</p>



<a name="188249681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249681">(Feb 14 2020 at 21:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what about ToParameter?</p>



<a name="188249685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249685">(Feb 14 2020 at 21:40)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">ToParameter</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Utility for converting a list of all the binders into scope</span>
<span class="w">    </span><span class="sd">/// into references to those binders. Simply pair the binders with</span>
<span class="w">    </span><span class="sd">/// the indices, and invoke `to_parameter()` on the `(binder,</span>
<span class="w">    </span><span class="sd">/// index)` pair. The result will be a reference to a bound</span>
<span class="w">    </span><span class="sd">/// variable of appropriate kind at the corresponding index.</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">to_parameter</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ToParameter</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="o">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="n">ParameterKind</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="kt">usize</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">to_parameter</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="o">&amp;</span><span class="p">(</span><span class="n">binder</span><span class="p">,</span><span class="w"> </span><span class="n">index</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="o">*</span><span class="n">binder</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">ParameterKind</span>::<span class="n">Lifetime</span><span class="p">(</span><span class="n">_</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">LifetimeData</span>::<span class="n">BoundVar</span><span class="p">(</span><span class="n">index</span><span class="p">).</span><span class="n">intern</span><span class="p">().</span><span class="n">cast</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="n">ParameterKind</span>::<span class="n">Ty</span><span class="p">(</span><span class="n">_</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">TyData</span>::<span class="n">BoundVar</span><span class="p">(</span><span class="n">index</span><span class="p">).</span><span class="n">intern</span><span class="p">().</span><span class="n">cast</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188249689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249689">(Feb 14 2020 at 21:40)</a>:</h4>
<p>ah, that :)</p>



<a name="188249693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249693">(Feb 14 2020 at 21:40)</a>:</h4>
<p>it neets an interner for BoundVar(index).intern(&lt;interner&gt;)</p>



<a name="188249697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249697">(Feb 14 2020 at 21:40)</a>:</h4>
<p>yeah</p>



<a name="188249701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249701">(Feb 14 2020 at 21:40)</a>:</h4>
<p>it should take a <code>&amp;I</code> I think</p>



<a name="188249711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249711">(Feb 14 2020 at 21:40)</a>:</h4>
<p>as an arg into to_parameter?</p>



<a name="188249720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249720">(Feb 14 2020 at 21:41)</a>:</h4>
<p>right</p>



<a name="188249721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249721">(Feb 14 2020 at 21:41)</a>:</h4>
<p>ack</p>



<a name="188249747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249747">(Feb 14 2020 at 21:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> same thing here?</p>



<a name="188249751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249751">(Feb 14 2020 at 21:41)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">AssociatedTyDatum</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Returns the associated ty&#39;s bounds applied to the projection type, e.g.:</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// ```notrust</span>
<span class="w">    </span><span class="sd">/// Implemented(&lt;?0 as Foo&gt;::Item&lt;?1&gt;: Sized)</span>
<span class="w">    </span><span class="sd">/// ```</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// these quantified where clauses are in the scope of the</span>
<span class="w">    </span><span class="sd">/// `binders` field.</span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">bounds_on_self</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">QuantifiedWhereClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188249758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249758">(Feb 14 2020 at 21:41)</a>:</h4>
<p>this uses to_parameters</p>



<a name="188249762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249762">(Feb 14 2020 at 21:41)</a>:</h4>
<p>and intern directly</p>



<a name="188249798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249798">(Feb 14 2020 at 21:42)</a>:</h4>
<p>both of which need an interner</p>



<a name="188249909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188249909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188249909">(Feb 14 2020 at 21:43)</a>:</h4>
<p>yeah</p>



<a name="188250340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250340">(Feb 14 2020 at 21:49)</a>:</h4>
<p>theres gonna be a lot of these repeat confirmations <span class="user-mention" data-user-id="116009">@nikomatsakis</span> sorry</p>



<a name="188250347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250347">(Feb 14 2020 at 21:49)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">push_auto_trait_impls</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">builder</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">ClauseBuilder</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">auto_trait_id</span>: <span class="nc">TraitId</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">struct_id</span>: <span class="nc">StructId</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188250352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250352">(Feb 14 2020 at 21:49)</a>:</h4>
<p>add arg?</p>



<a name="188250366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250366">(Feb 14 2020 at 21:49)</a>:</h4>
<p>this is a free fn in <a href="http://clauses.rs" target="_blank" title="http://clauses.rs">clauses.rs</a> in chalk-solve</p>



<a name="188250444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250444">(Feb 14 2020 at 21:50)</a>:</h4>
<p>hmm</p>



<a name="188250457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250457">(Feb 14 2020 at 21:50)</a>:</h4>
<p>probably yes :)</p>



<a name="188250462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250462">(Feb 14 2020 at 21:50)</a>:</h4>
<p>lol okay</p>



<a name="188250467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250467">(Feb 14 2020 at 21:50)</a>:</h4>
<p>though I wonder if <code>builder</code> should store a <code>&amp;I</code></p>



<a name="188250498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250498">(Feb 14 2020 at 21:50)</a>:</h4>
<p>wait, <span class="user-mention" data-user-id="220273">@Jane Lusby</span>, did you complete the rename?</p>



<a name="188250503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250503">(Feb 14 2020 at 21:51)</a>:</h4>
<p>I guess you must've :)</p>



<a name="188250504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250504">(Feb 14 2020 at 21:51)</a>:</h4>
<p>yes</p>



<a name="188250510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250510">(Feb 14 2020 at 21:51)</a>:</h4>
<p>the PR is waiting for approval</p>



<a name="188250511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250511">(Feb 14 2020 at 21:51)</a>:</h4>
<p>(you could open a PR for that..if you didn't already)</p>



<a name="188250515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250515">(Feb 14 2020 at 21:51)</a>:</h4>
<p>im working on top of it</p>



<a name="188250517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250517">(Feb 14 2020 at 21:51)</a>:</h4>
<p>oh, ok</p>



<a name="188250533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250533">(Feb 14 2020 at 21:51)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/329" target="_blank" title="https://github.com/rust-lang/chalk/pull/329">https://github.com/rust-lang/chalk/pull/329</a></p>



<a name="188250570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250570">(Feb 14 2020 at 21:52)</a>:</h4>
<p>I'm merging that;)</p>



<a name="188250611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250611">(Feb 14 2020 at 21:52)</a>:</h4>
<p>awesome :)</p>



<a name="188250617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250617">(Feb 14 2020 at 21:52)</a>:</h4>
<p>(I did page down throgh it, looked good to me)</p>



<a name="188250642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250642">(Feb 14 2020 at 21:52)</a>:</h4>
<p>and I think <code>Interner</code> was the right choice, it reads really naturally now</p>



<a name="188250659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250659">(Feb 14 2020 at 21:52)</a>:</h4>
<p><span aria-label="blush" class="emoji emoji-1f60a" role="img" title="blush">:blush:</span></p>



<a name="188250678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250678">(Feb 14 2020 at 21:53)</a>:</h4>
<p>im going to go ahead and add an interner fn to ClauseBuilder</p>



<a name="188250686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250686">(Feb 14 2020 at 21:53)</a>:</h4>
<p>because I think thats easy to undo later</p>



<a name="188250687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250687">(Feb 14 2020 at 21:53)</a>:</h4>
<p>yeah I suspect that is right</p>



<a name="188250708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250708">(Feb 14 2020 at 21:53)</a>:</h4>
<p>and it lets me avoid a ton of work by just putting <code>unimplemented()</code> in the initial def</p>



<a name="188250913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250913">(Feb 14 2020 at 21:55)</a>:</h4>
<p>okay what about CoherenceSolver</p>



<a name="188250920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250920">(Feb 14 2020 at 21:55)</a>:</h4>
<p>doesn't appear I have a ClauseBuilder available here</p>



<a name="188250996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188250996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188250996">(Feb 14 2020 at 21:56)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">disjoint</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">lhs</span>: <span class="kp">&amp;</span><span class="nc">ImplDatum</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">rhs</span>: <span class="kp">&amp;</span><span class="nc">ImplDatum</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
</pre></div>


<p>needs access to an interner for its call to <code>compatible</code></p>



<a name="188251082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251082">(Feb 14 2020 at 21:57)</a>:</h4>
<p>gonna just go with the same approach as ClauseBuilder for same reason</p>



<a name="188251099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251099">(Feb 14 2020 at 21:57)</a>:</h4>
<p>actually this only uses the interner in one place i think?</p>



<a name="188251101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251101">(Feb 14 2020 at 21:57)</a>:</h4>
<p>hmm so</p>



<a name="188251107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251107">(Feb 14 2020 at 21:57)</a>:</h4>
<p>I am thinking that the RustIrDatabase trait</p>



<a name="188251117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251117">(Feb 14 2020 at 21:57)</a>:</h4>
<p>should maybe have a <code>fn interner(&amp;self) -&gt; &amp;I</code> method</p>



<a name="188251162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251162">(Feb 14 2020 at 21:58)</a>:</h4>
<p>okay</p>



<a name="188251200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251200">(Feb 14 2020 at 21:58)</a>:</h4>
<p>that seems right anyway</p>



<a name="188251223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251223">(Feb 14 2020 at 21:58)</a>:</h4>
<p>to be honest, we could even want <code>trait RustIrDatabase: Interner</code></p>



<a name="188251226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251226">(Feb 14 2020 at 21:58)</a>:</h4>
<p>but let's not do that now</p>



<a name="188251268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251268">(Feb 14 2020 at 21:59)</a>:</h4>
<p>ack</p>



<a name="188251280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251280">(Feb 14 2020 at 21:59)</a>:</h4>
<p>what about InferenceTable</p>



<a name="188251288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251288">(Feb 14 2020 at 21:59)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">struct</span> <span class="nc">InferenceTable</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">unify</span>: <span class="nc">ena</span>::<span class="n">unify</span>::<span class="n">InPlaceUnificationTable</span><span class="o">&lt;</span><span class="n">EnaVariable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">vars</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">EnaVariable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">max_universe</span>: <span class="nc">UniverseIndex</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188251343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251343">(Feb 14 2020 at 22:00)</a>:</h4>
<p>needs one for </p>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">fn</span> <span class="nf">instantiate_binders_universally</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">arg</span>: <span class="nc">impl</span><span class="w"> </span><span class="n">IntoBindersAndValue</span><span class="o">&lt;</span><span class="n">Value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">T</span>::<span class="nb">Result</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="n">T</span>: <span class="nc">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188251378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251378">(Feb 14 2020 at 22:00)</a>:</h4>
<p>Hmm</p>



<a name="188251390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251390">(Feb 14 2020 at 22:00)</a>:</h4>
<p>you know, side note</p>



<a name="188251406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251406">(Feb 14 2020 at 22:00)</a>:</h4>
<p>we've been passing <code>&amp;I</code> everywhere</p>



<a name="188251424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251424">(Feb 14 2020 at 22:01)</a>:</h4>
<p>but we could've made it <code>Interner: Copy</code>..no, I think <code>&amp;I</code> is probably right</p>



<a name="188251446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251446">(Feb 14 2020 at 22:01)</a>:</h4>
<p>I think I would not store it in <code>InferenceTable</code></p>



<a name="188251449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251449">(Feb 14 2020 at 22:01)</a>:</h4>
<p>:3</p>



<a name="188251457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251457">(Feb 14 2020 at 22:01)</a>:</h4>
<p>so just take as an arg for instantiate...</p>



<a name="188251460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251460">(Feb 14 2020 at 22:01)</a>:</h4>
<p>I'm wondering if we will regret that</p>



<a name="188251462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251462">(Feb 14 2020 at 22:01)</a>:</h4>
<p>but let's try it</p>



<a name="188251464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251464">(Feb 14 2020 at 22:01)</a>:</h4>
<p>okay</p>



<a name="188251472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251472">(Feb 14 2020 at 22:01)</a>:</h4>
<p>im going to git add rn</p>



<a name="188251478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251478">(Feb 14 2020 at 22:01)</a>:</h4>
<p>so its easy to undo</p>



<a name="188251591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251591">(Feb 14 2020 at 22:03)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">GoalExt</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Returns a canonical goal in which the outermost `exists&lt;&gt;` and</span>
<span class="w">    </span><span class="sd">/// `forall&lt;&gt;` quantifiers (as well as implications) have been</span>
<span class="w">    </span><span class="sd">/// &quot;peeled&quot; and are converted into free universal or existential</span>
<span class="w">    </span><span class="sd">/// variables. Assumes that this goal is a &quot;closed goal&quot; which</span>
<span class="w">    </span><span class="sd">/// does not -- at present -- contain any variables. Useful for</span>
<span class="w">    </span><span class="sd">/// REPLs and tests but not much else.</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">into_peeled_goal</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">UCanonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188251595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251595">(Feb 14 2020 at 22:03)</a>:</h4>
<p>need an interner here</p>



<a name="188251597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251597">(Feb 14 2020 at 22:03)</a>:</h4>
<p>arg?</p>



<a name="188251722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251722">(Feb 14 2020 at 22:04)</a>:</h4>
<p>yes</p>



<a name="188251877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251877">(Feb 14 2020 at 22:06)</a>:</h4>
<p>aaand what about</p>



<a name="188251882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251882">(Feb 14 2020 at 22:06)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;t</span><span class="p">,</span><span class="w"> </span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Unifier</span><span class="o">&lt;</span><span class="na">&#39;t</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188251892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251892">(Feb 14 2020 at 22:06)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">unify_binders</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">R</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">a</span>: <span class="nc">impl</span><span class="w"> </span><span class="n">IntoBindersAndValue</span><span class="o">&lt;</span><span class="n">Value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Copy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Debug</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">b</span>: <span class="nc">impl</span><span class="w"> </span><span class="n">IntoBindersAndValue</span><span class="o">&lt;</span><span class="n">Value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Copy</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Debug</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="n">T</span>: <span class="nc">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="nb">Result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">R</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">R</span>: <span class="nc">Zip</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="nb">Result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">R</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188251903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251903">(Feb 14 2020 at 22:07)</a>:</h4>
<p>I was wondering when you would get to that one</p>



<a name="188251911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251911">(Feb 14 2020 at 22:07)</a>:</h4>
<p>that should have a <code>&amp;'t I</code> in <code>Unifier</code></p>



<a name="188251919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251919">(Feb 14 2020 at 22:07)</a>:</h4>
<p>for sure</p>



<a name="188251921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188251921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188251921">(Feb 14 2020 at 22:07)</a>:</h4>
<p>okay</p>



<a name="188252013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252013">(Feb 14 2020 at 22:08)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">EnaVariable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Convert this inference variable into a type. When using this</span>
<span class="w">    </span><span class="sd">/// method, naturally you should know from context that the kind</span>
<span class="w">    </span><span class="sd">/// of this inference variable is a type (we can&#39;t check it).</span>
<span class="w">    </span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">fn</span> <span class="nf">to_ty</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">var</span><span class="p">.</span><span class="n">to_ty</span>::<span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188252029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252029">(Feb 14 2020 at 22:08)</a>:</h4>
<p>arg?</p>



<a name="188252050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252050">(Feb 14 2020 at 22:08)</a>:</h4>
<p>yes</p>



<a name="188252083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252083">(Feb 14 2020 at 22:09)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ParameterEnaVariableExt</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">ParameterEnaVariable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">to_parameter</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="bp">self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">ParameterKind</span>::<span class="n">Ty</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">to_ty</span><span class="p">().</span><span class="n">cast</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="n">ParameterKind</span>::<span class="n">Lifetime</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">to_lifetime</span><span class="p">().</span><span class="n">cast</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188252086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252086">(Feb 14 2020 at 22:09)</a>:</h4>
<p>assuming arg</p>



<a name="188252169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252169">(Feb 14 2020 at 22:10)</a>:</h4>
<p>and by extension adding an arg to</p>



<a name="188252173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252173">(Feb 14 2020 at 22:10)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">fn</span> <span class="nf">fresh_subst</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">I</span><span class="p">,</span><span class="w"></span>
</pre></div>



<a name="188252175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252175">(Feb 14 2020 at 22:10)</a>:</h4>
<p>in InferenceTable</p>



<a name="188252204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252204">(Feb 14 2020 at 22:11)</a>:</h4>
<p>wait</p>



<a name="188252205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252205">(Feb 14 2020 at 22:11)</a>:</h4>
<p>awe shit this is spreading like a contagion in InferenceTable fn args</p>



<a name="188252211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252211">(Feb 14 2020 at 22:11)</a>:</h4>
<p>I mean, it has an arg already</p>



<a name="188252218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252218">(Feb 14 2020 at 22:11)</a>:</h4>
<p>but I guess you already added it</p>



<a name="188252220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252220">(Feb 14 2020 at 22:11)</a>:</h4>
<p>only on</p>



<a name="188252222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252222">(Feb 14 2020 at 22:11)</a>:</h4>
<p>yea</p>



<a name="188252226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252226">(Feb 14 2020 at 22:11)</a>:</h4>
<p>i just added that</p>



<a name="188252232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252232">(Feb 14 2020 at 22:11)</a>:</h4>
<p>sorry</p>



<a name="188252243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252243">(Feb 14 2020 at 22:11)</a>:</h4>
<p>been posting pre changes then randomly did one post <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="188252312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252312">(Feb 14 2020 at 22:12)</a>:</h4>
<p>:)</p>



<a name="188252324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252324">(Feb 14 2020 at 22:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188252205" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188252205">said</a>:</p>
<blockquote>
<p>awe shit this is spreading like a contagion in InferenceTable fn args</p>
</blockquote>
<p>yeah .. I'm not too surprised ..</p>



<a name="188252333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252333">(Feb 14 2020 at 22:12)</a>:</h4>
<p>it might be that inference table should have a reference</p>



<a name="188252338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252338">(Feb 14 2020 at 22:12)</a>:</h4>
<p>just kind of annoying</p>



<a name="188252351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252351">(Feb 14 2020 at 22:12)</a>:</h4>
<p>hmm</p>



<a name="188252356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252356">(Feb 14 2020 at 22:13)</a>:</h4>
<p>I wonder actually</p>



<a name="188252369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252369">(Feb 14 2020 at 22:13)</a>:</h4>
<p>I feel like I want <code>I</code> to be <code>Clone</code></p>



<a name="188252378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252378">(Feb 14 2020 at 22:13)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="n">CanonicalExt</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">HasInterner</span><span class="o">&lt;</span><span class="n">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">I</span>: <span class="nc">Interner</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Maps the contents using `op`, but preserving the binders.</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// NB. `op` will be invoked with an instantiated version of the</span>
<span class="w">    </span><span class="sd">/// canonical value, where inference variables (from a fresh</span>
<span class="w">    </span><span class="sd">/// inference context) are used in place of the quantified free</span>
<span class="w">    </span><span class="sd">/// variables. The result should be in terms of those same</span>
<span class="w">    </span><span class="sd">/// inference variables and will be re-canonicalized.</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">map</span><span class="o">&lt;</span><span class="n">OP</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">op</span>: <span class="nc">OP</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Canonical</span><span class="o">&lt;</span><span class="n">U</span>::<span class="nb">Result</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="n">OP</span>: <span class="nb">FnOnce</span><span class="p">(</span><span class="n">T</span>::<span class="nb">Result</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">U</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">T</span>: <span class="nc">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">U</span>: <span class="nc">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">U</span>::<span class="nb">Result</span>: <span class="nc">HasInterner</span><span class="o">&lt;</span><span class="n">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Subtle: It is only quite rarely correct to apply `op` and</span>
<span class="w">        </span><span class="c1">// just re-use our existing binders. For that to be valid, the</span>
<span class="w">        </span><span class="c1">// result of `op` would have to ensure that it re-uses all the</span>
<span class="w">        </span><span class="c1">// existing free variables and in the same order. Otherwise,</span>
<span class="w">        </span><span class="c1">// the canonical form would be different: the variables might</span>
<span class="w">        </span><span class="c1">// be numbered differently, or some may not longer be used.</span>
<span class="w">        </span><span class="c1">// This would mean that two canonical values could no longer</span>
<span class="w">        </span><span class="c1">// be compared with `Eq`, which defeats a key invariant of the</span>
<span class="w">        </span><span class="c1">// `Canonical` type (indeed, its entire reason for existence).</span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">infer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">InferenceTable</span>::<span class="n">new</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">snapshot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">infer</span><span class="p">.</span><span class="n">snapshot</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">instantiated_value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">infer</span><span class="p">.</span><span class="n">instantiate_canonical</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">mapped_value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">op</span><span class="p">(</span><span class="n">instantiated_value</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">infer</span><span class="p">.</span><span class="n">canonicalize</span><span class="p">(</span><span class="o">&amp;</span><span class="n">mapped_value</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="n">infer</span><span class="p">.</span><span class="n">rollback_to</span><span class="p">(</span><span class="n">snapshot</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="n">result</span><span class="p">.</span><span class="n">quantified</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188252385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252385">(Feb 14 2020 at 22:13)</a>:</h4>
<p>this needs an interner</p>



<a name="188252386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252386">(Feb 14 2020 at 22:13)</a>:</h4>
<p>I don't know what type it would map to in rust-analyzer</p>



<a name="188252396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252396">(Feb 14 2020 at 22:13)</a>:</h4>
<p>in <em>rustc</em> it'd be no problem for it to be <code>Copy</code> and to be passed around by value everywhere</p>



<a name="188252406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252406">(Feb 14 2020 at 22:13)</a>:</h4>
<p>but I think rust-analyzer that might not be true</p>



<a name="188252411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252411">(Feb 14 2020 at 22:14)</a>:</h4>
<p>so we'd prefer to thread it as parameters</p>



<a name="188252454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252454">(Feb 14 2020 at 22:14)</a>:</h4>
<p>ack</p>



<a name="188252456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252456">(Feb 14 2020 at 22:14)</a>:</h4>
<p>rather than store it in <code>InferenceTable</code>, since I think those can be relatively long-lived</p>



<a name="188252457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252457">(Feb 14 2020 at 22:14)</a>:</h4>
<p>lets default to &amp; for now then</p>



<a name="188252507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252507">(Feb 14 2020 at 22:15)</a>:</h4>
<p>this CanonicalExt fn still needs an interner tho</p>



<a name="188252554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252554">(Feb 14 2020 at 22:15)</a>:</h4>
<p>gonna do as arg</p>



<a name="188252636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252636">(Feb 14 2020 at 22:16)</a>:</h4>
<p>seems right</p>



<a name="188252639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252639">(Feb 14 2020 at 22:16)</a>:</h4>
<p>and im gonna toss the refernece in InferenceTable</p>



<a name="188252643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252643">(Feb 14 2020 at 22:16)</a>:</h4>
<p>see how that goes</p>



<a name="188252823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252823">(Feb 14 2020 at 22:19)</a>:</h4>
<p>oooor maybe not</p>



<a name="188252834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252834">(Feb 14 2020 at 22:19)</a>:</h4>
<p><a href="/user_uploads/4715/EWbPW6c4vkES7_qsYLmslgb8/Screenshot-from-2020-02-14-14-19-16.png" target="_blank" title="Screenshot-from-2020-02-14-14-19-16.png">Screenshot-from-2020-02-14-14-19-16.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/EWbPW6c4vkES7_qsYLmslgb8/Screenshot-from-2020-02-14-14-19-16.png" target="_blank" title="Screenshot-from-2020-02-14-14-19-16.png"><img src="/user_uploads/4715/EWbPW6c4vkES7_qsYLmslgb8/Screenshot-from-2020-02-14-14-19-16.png"></a></div>



<a name="188252931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188252931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188252931">(Feb 14 2020 at 22:20)</a>:</h4>
<p>hmm not sure what's up with that</p>



<a name="188253170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253170">(Feb 14 2020 at 22:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188252386" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188252386">said</a>:</p>
<blockquote>
<p>I don't know what type it would map to in rust-analyzer</p>
</blockquote>
<p>I'd expect it to be <a href="https://github.com/rust-analyzer/rust-analyzer/blob/9ba801befd70892bf40429512e890389171aa59f/crates/ra_hir_ty/src/traits.rs#L94-L98" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/9ba801befd70892bf40429512e890389171aa59f/crates/ra_hir_ty/src/traits.rs#L94-L98">this</a></p>



<a name="188253178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253178">(Feb 14 2020 at 22:24)</a>:</h4>
<p>i just backtracked to threading via args nbd</p>



<a name="188253203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253203">(Feb 14 2020 at 22:25)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Folder</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">OccursCheck</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188253207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253207">(Feb 14 2020 at 22:25)</a>:</h4>
<p>this raises a minor question</p>



<a name="188253225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253225">(Feb 14 2020 at 22:25)</a>:</h4>
<p>we have <code>interner()</code> from folder and self.unifier.interner from OccursCheck</p>



<a name="188253326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253326">(Feb 14 2020 at 22:26)</a>:</h4>
<p>is the question "which one to use"?</p>



<a name="188253338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253338">(Feb 14 2020 at 22:26)</a>:</h4>
<p>it shouldn't matter</p>



<a name="188253345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253345">(Feb 14 2020 at 22:26)</a>:</h4>
<p>gonna do self.interner</p>



<a name="188253350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253350">(Feb 14 2020 at 22:27)</a>:</h4>
<p>I think the expectation is that the interner will be threaded around rather broadly</p>



<a name="188253351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253351">(Feb 14 2020 at 22:27)</a>:</h4>
<p>on the assumption that this will be implemented as <code>self.unifier.interner</code></p>



<a name="188253374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253374">(Feb 14 2020 at 22:27)</a>:</h4>
<p>right</p>



<a name="188253398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253398">(Feb 14 2020 at 22:27)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">context</span>::<span class="n">Context</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SlgContext</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalGoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalExClause</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">Self</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">UCanonicalGoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">UCanonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">UniverseMap</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">UniverseMap</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">InferenceNormalizedSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Solution</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Solution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">InferenceTable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TruncatingInferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Environment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Environment</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">DomainGoal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DomainGoal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Goal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">BindersGoal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Binders</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Parameter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">ProgramClause</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">ProgramClauses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalConstrainedSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">ConstrainedSubst</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalAnswerSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">AnswerSubst</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">GoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Substitution</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">RegionConstraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Constraint</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Variance</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
</pre></div>



<a name="188253405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253405">(Feb 14 2020 at 22:27)</a>:</h4>
<p>thats a signature and a half</p>



<a name="188253409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253409">(Feb 14 2020 at 22:27)</a>:</h4>
<p>lol</p>



<a name="188253433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253433">(Feb 14 2020 at 22:28)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">identity_constrained_subst</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">goal</span>: <span class="kp">&amp;</span><span class="nc">UCanonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Canonical</span><span class="o">&lt;</span><span class="n">ConstrainedSubst</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188253472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253472">(Feb 14 2020 at 22:28)</a>:</h4>
<p>need an interner here</p>



<a name="188253512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253512">(Feb 14 2020 at 22:28)</a>:</h4>
<p>hmm</p>



<a name="188253572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253572">(Feb 14 2020 at 22:29)</a>:</h4>
<p>I'm coming back again btw to the question of whether we should be allowed to take ownership of <code>Interner</code> :)</p>



<a name="188253584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253584">(Feb 14 2020 at 22:29)</a>:</h4>
<p>because I would say that <code>SlgContext&lt;I&gt;</code> could own an <code>I</code></p>



<a name="188253672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253672">(Feb 14 2020 at 22:30)</a>:</h4>
<p>```pub(crate) struct SlgContextOps&lt;'me, I: Interner&gt; {<br>
    program: &amp;'me dyn RustIrDatabase&lt;I&gt;,</p>
<div class="codehilite"><pre><span></span>
</pre></div>



<a name="188253673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253673">(Feb 14 2020 at 22:30)</a>:</h4>
<p>just noticed we have a db</p>



<a name="188253708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253708">(Feb 14 2020 at 22:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="129457">Florian Diebold</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188253170" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188253170">said</a>:</p>
<blockquote>
<p>I'd expect it to be <a href="https://github.com/rust-analyzer/rust-analyzer/blob/9ba801befd70892bf40429512e890389171aa59f/crates/ra_hir_ty/src/traits.rs#L94-L98" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/9ba801befd70892bf40429512e890389171aa59f/crates/ra_hir_ty/src/traits.rs#L94-L98">this</a></p>
</blockquote>
<p>I'm not sure about this though, because I think that these types ought to be types that are not tied to the <code>'a</code> lifetime there</p>



<a name="188253723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253723">(Feb 14 2020 at 22:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188253673" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188253673">said</a>:</p>
<blockquote>
<p>just noticed we have a db</p>
</blockquote>
<p>ah, yes</p>



<a name="188253804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253804">(Feb 14 2020 at 22:32)</a>:</h4>
<p>that requires me adding a <code>&amp;self</code> arg to the identity_constraitned_subst fn</p>



<a name="188253835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253835">(Feb 14 2020 at 22:33)</a>:</h4>
<p>wait no</p>



<a name="188253836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253836">(Feb 14 2020 at 22:33)</a>:</h4>
<p>its the Ops that has the db</p>



<a name="188253839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253839">(Feb 14 2020 at 22:33)</a>:</h4>
<p>not the self</p>



<a name="188253846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253846">(Feb 14 2020 at 22:33)</a>:</h4>
<p>yeah, but the method could maybe move to <code>Ops</code></p>



<a name="188253847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253847">(Feb 14 2020 at 22:33)</a>:</h4>
<p>I check zulip and there's 132 unread messages on wg-traits, my goodness</p>



<a name="188253852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253852">(Feb 14 2020 at 22:33)</a>:</h4>
<p>yea,</p>



<a name="188253900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253900">(Feb 14 2020 at 22:34)</a>:</h4>
<p>im basically being a human language based keyboard for niko rn</p>



<a name="188253906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253906">(Feb 14 2020 at 22:34)</a>:</h4>
<p>I'm going to have to go in a bit :)</p>



<a name="188253909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253909">(Feb 14 2020 at 22:34)</a>:</h4>
<p>okay</p>



<a name="188253914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253914">(Feb 14 2020 at 22:34)</a>:</h4>
<p>should I stop now or should we keep going until you have to go?</p>



<a name="188253916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253916">(Feb 14 2020 at 22:34)</a>:</h4>
<p>but I do want to sit with <span class="user-mention" data-user-id="129457">@Florian Diebold</span> -- or maybe just read over code a bit -- because I think we should settle this question of whether we can <em>own</em> the <code>I</code></p>



<a name="188253918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253918">(Feb 14 2020 at 22:34)</a>:</h4>
<p>i'm beginning to think</p>



<a name="188253925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253925">(Feb 14 2020 at 22:34)</a>:</h4>
<p>that pair programming idea is probably a good one</p>



<a name="188253930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253930">(Feb 14 2020 at 22:34)</a>:</h4>
<p>lets plan on meeting up after my work is done?</p>



<a name="188253942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188253942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188253942">(Feb 14 2020 at 22:34)</a>:</h4>
<p>i have some work I should probably do anyways</p>



<a name="188254001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188254001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188254001">(Feb 14 2020 at 22:35)</a>:</h4>
<p>I can also answer some questions if I'm around when you ask them :)</p>



<a name="188254123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188254123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188254123">(Feb 14 2020 at 22:37)</a>:</h4>
<p>i think its okay if we wait a few hours</p>



<a name="188254128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188254128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188254128">(Feb 14 2020 at 22:37)</a>:</h4>
<p>but if niko isnt around ill definitely bother you</p>



<a name="188254132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188254132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188254132">(Feb 14 2020 at 22:37)</a>:</h4>
<p>I have to go offline now, but <span class="user-mention" data-user-id="220273">@Jane Lusby</span> seems like you made a lot of progress in any case :)</p>



<a name="188254138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188254138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188254138">(Feb 14 2020 at 22:37)</a>:</h4>
<p>^_^</p>



<a name="188255020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255020">(Feb 14 2020 at 22:52)</a>:</h4>
<p>K gonna take a break for now, I pushed my changes so far to <a href="https://github.com/rust-lang/chalk/pull/330/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/330/files">https://github.com/rust-lang/chalk/pull/330/files</a></p>



<a name="188255029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255029">(Feb 14 2020 at 22:52)</a>:</h4>
<p>so feel free to take a look with it / leave suggestions / comments <span class="user-mention" data-user-id="232957">@Jack Huey</span></p>



<a name="188255056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255056">(Feb 14 2020 at 22:53)</a>:</h4>
<p>Sure I'll take a look :)</p>



<a name="188255292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255292">(Feb 14 2020 at 22:57)</a>:</h4>
<p><a href="/user_uploads/4715/PBYpn72iebLuvumVNMP06qSE/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a> rebasing on the TF -&gt; I changes</p>
<div class="message_inline_image"><a href="/user_uploads/4715/PBYpn72iebLuvumVNMP06qSE/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/PBYpn72iebLuvumVNMP06qSE/pasted_image.png"></a></div>



<a name="188255409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255409">(Feb 14 2020 at 22:59)</a>:</h4>
<p>im so sorry <span aria-label="sob" class="emoji emoji-1f62d" role="img" title="sob">:sob:</span></p>



<a name="188255423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255423">(Feb 14 2020 at 22:59)</a>:</h4>
<p>it's okay</p>



<a name="188255455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188255455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188255455">(Feb 14 2020 at 23:00)</a>:</h4>
<p>at least that file (debug) was super easy because I just has to accept all current and find/replace <code>Formatter</code> with <code>Formatter&lt;'_&gt;</code></p>



<a name="188257767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188257767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188257767">(Feb 14 2020 at 23:38)</a>:</h4>
<p>:D</p>



<a name="188260138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188260138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188260138">(Feb 15 2020 at 00:16)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> (still afk, but I was going to say that if we can't pull off a pair session, next best thing is to push to a branch)</p>



<a name="188260158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188260158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188260158">(Feb 15 2020 at 00:17)</a>:</h4>
<p>Also, I gave it some thought, and I think that the <code>I</code> parameter in <code>rust-analyzer</code> should map to <code>DB</code>, <span class="user-mention" data-user-id="129457">@Florian Diebold</span></p>



<a name="188260628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188260628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188260628">(Feb 15 2020 at 00:25)</a>:</h4>
<p>Well I already pushed a branch so we're good to go either way</p>



<a name="188261321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188261321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188261321">(Feb 15 2020 at 00:38)</a>:</h4>
<p>so yea <span class="user-mention" data-user-id="116009">@nikomatsakis</span> im planning on setting aside time for working on this PR tonight, I can basically start at any time now. Just lmk when or if you're not gonna be available tonight lmk ahead of time so I can head home.</p>



<a name="188262483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188262483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188262483">(Feb 15 2020 at 01:02)</a>:</h4>
<p>on second thought, I just realized I forgot today is valentines day, so I'm gonna have to raincheck, but I will hopefully have time to work on this on monday, if you need to get it done before then please feel free to take the branch I pushed and just finish it up.</p>



<a name="188496303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188496303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188496303">(Feb 18 2020 at 22:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> / <span class="user-mention" data-user-id="232957">@Jack Huey</span> lmk if either of you have time to help me power through the rest of the PR, today after work works well for me</p>



<a name="188500295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188500295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188500295">(Feb 18 2020 at 23:00)</a>:</h4>
<p>I can help :)</p>



<a name="188500481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188500481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188500481">(Feb 18 2020 at 23:03)</a>:</h4>
<p>I skimmed through your PR so far. Nothing seemed obviously <em>wrong</em>. But it's so incomplete that I didn't really want to think too hard about it</p>



<a name="188501365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188501365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188501365">(Feb 18 2020 at 23:17)</a>:</h4>
<p>thats fair</p>



<a name="188501369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188501369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188501369">(Feb 18 2020 at 23:17)</a>:</h4>
<p>im finishing up another PR real quick then im gonna dig back into it</p>



<a name="188501434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188501434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188501434">(Feb 18 2020 at 23:18)</a>:</h4>
<p>as it stands I don't really feel like its a PR I could easily do on my own because I just don't know the layout of the project well enough to know which structs should have references to the interner added to them and which ones should get it via args to their fns</p>



<a name="188501448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188501448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188501448">(Feb 18 2020 at 23:18)</a>:</h4>
<p>so its pretty much just me asking "pass as arg here?" over and over again</p>



<a name="188501566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188501566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188501566">(Feb 18 2020 at 23:20)</a>:</h4>
<p>makes sense</p>



<a name="188504581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504581">(Feb 19 2020 at 00:09)</a>:</h4>
<p>okay so heres where I left off <span class="user-mention" data-user-id="232957">@Jack Huey</span></p>



<a name="188504582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504582">(Feb 19 2020 at 00:09)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">struct</span> <span class="nc">SlgContext</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">max_size</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// The expected number of answers for a solution.</span>
<span class="w">    </span><span class="sd">/// Only really sseful for tests, since `make_solution`</span>
<span class="w">    </span><span class="sd">/// will panic if the number of cached answers does not</span>
<span class="w">    </span><span class="sd">/// equal this when a solution is made.</span>
<span class="w">    </span><span class="n">expected_answers</span>: <span class="nb">Option</span><span class="o">&lt;</span><span class="kt">usize</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">phantom</span>: <span class="nc">PhantomData</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188504592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504592">(Feb 19 2020 at 00:09)</a>:</h4>
<p>should slgcontext have a reference or something to the Interner added</p>



<a name="188504647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504647">(Feb 19 2020 at 00:10)</a>:</h4>
<p>right now Unifiers have refernces added</p>



<a name="188504661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504661">(Feb 19 2020 at 00:10)</a>:</h4>
<p>I'm gonna go with <em>no</em></p>



<a name="188504663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504663">(Feb 19 2020 at 00:10)</a>:</h4>
<p>Folders and RustIRDatabase have methods for accessing one that are currently unimplemented</p>



<a name="188504667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504667">(Feb 19 2020 at 00:10)</a>:</h4>
<p>alright, so just thread thru in args</p>



<a name="188504670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504670">(Feb 19 2020 at 00:10)</a>:</h4>
<p>If anything, it would go on <code>ContextOps</code>/<code>SlgContextOps</code></p>



<a name="188504679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504679">(Feb 19 2020 at 00:11)</a>:</h4>
<p>yea its already in SlgContextOpts technically</p>



<a name="188504686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504686">(Feb 19 2020 at 00:11)</a>:</h4>
<p>via the irdatabase member</p>



<a name="188504698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504698">(Feb 19 2020 at 00:11)</a>:</h4>
<p>but i need it in <code>    fn identity_constrained_subst(</code></p>



<a name="188504702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504702">(Feb 19 2020 at 00:11)</a>:</h4>
<p>the functions in <code>Context</code> may need to be moved to <code>SlgContextOps</code></p>



<a name="188504703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504703">(Feb 19 2020 at 00:11)</a>:</h4>
<p>which is a method of Context impled on the SlgContext</p>



<a name="188504712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504712">(Feb 19 2020 at 00:11)</a>:</h4>
<p>ooh</p>



<a name="188504779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504779">(Feb 19 2020 at 00:12)</a>:</h4>
<p>whats the difference between the two pieces</p>



<a name="188504787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504787">(Feb 19 2020 at 00:12)</a>:</h4>
<p>(trying to know how I would decide which fns to move)</p>



<a name="188504792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504792">(Feb 19 2020 at 00:12)</a>:</h4>
<p><code>SlgContext</code> functions don't have a <code>&amp;self</code></p>



<a name="188504795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504795">(Feb 19 2020 at 00:12)</a>:</h4>
<p>other than "if it needs access to the context it should be in ops"</p>



<a name="188504796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504796">(Feb 19 2020 at 00:12)</a>:</h4>
<p>basically only that</p>



<a name="188504799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504799">(Feb 19 2020 at 00:12)</a>:</h4>
<p>okay</p>



<a name="188504801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504801">(Feb 19 2020 at 00:12)</a>:</h4>
<p>welp that makes it easy</p>



<a name="188504828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188504828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188504828">(Feb 19 2020 at 00:13)</a>:</h4>
<p><code>identity_constrained_subst</code> makes sense to be in <code>ContextOps</code> since where it's called, <code>ContextOps</code> is <code>Self</code></p>



<a name="188505282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505282">(Feb 19 2020 at 00:21)</a>:</h4>
<p>yea that worked out</p>



<a name="188505283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505283">(Feb 19 2020 at 00:21)</a>:</h4>
<p>what about this one</p>



<a name="188505286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505286">(Feb 19 2020 at 00:21)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">context</span>::<span class="n">UnificationOps</span><span class="o">&lt;</span><span class="n">SlgContext</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">TruncatingInferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">instantiate_binders_universally</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">arg</span>: <span class="kp">&amp;</span><span class="nc">Binders</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">infer</span><span class="p">.</span><span class="n">instantiate_binders_universally</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">instantiate_binders_existentially</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">arg</span>: <span class="kp">&amp;</span><span class="nc">Binders</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">infer</span><span class="p">.</span><span class="n">instantiate_binders_existentially</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188505290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505290">(Feb 19 2020 at 00:21)</a>:</h4>
<p>instantiate_binders_universally needs an interner</p>



<a name="188505356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505356">(Feb 19 2020 at 00:23)</a>:</h4>
<p>Probably on <code>TruncatingInferenceTable</code></p>



<a name="188505376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505376">(Feb 19 2020 at 00:23)</a>:</h4>
<p>ooh that's gonna be tough</p>



<a name="188505452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505452">(Feb 19 2020 at 00:25)</a>:</h4>
<p>maybe just on the functions</p>



<a name="188505557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505557">(Feb 19 2020 at 00:27)</a>:</h4>
<p>need to figure out how to get the interner type available in the trait signature</p>



<a name="188505561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505561">(Feb 19 2020 at 00:27)</a>:</h4>
<p>because its a parameter on the impl right now</p>



<a name="188505569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505569">(Feb 19 2020 at 00:27)</a>:</h4>
<p>right, that's why I said it's gonna be tough</p>



<a name="188505581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505581">(Feb 19 2020 at 00:27)</a>:</h4>
<p>i noticed the HasInterner trait earlier</p>



<a name="188505626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505626">(Feb 19 2020 at 00:28)</a>:</h4>
<p>should I just add a HasInterner bound on UnificationOps trait</p>



<a name="188505637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505637">(Feb 19 2020 at 00:28)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">UnificationOps</span><span class="o">&lt;</span><span class="n">C</span>: <span class="nc">Context</span><span class="o">&gt;</span>: <span class="nc">HasInterner</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// Used by: simplify</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">instantiate_binders_universally</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">Self</span>::<span class="n">Interner</span><span class="p">,</span><span class="w"> </span><span class="n">arg</span>: <span class="kp">&amp;</span><span class="nc">C</span>::<span class="n">BindersGoal</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">C</span>::<span class="n">Goal</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="188505655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505655">(Feb 19 2020 at 00:29)</a>:</h4>
<p>probably</p>



<a name="188505747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505747">(Feb 19 2020 at 00:30)</a>:</h4>
<p>looks like that wont work</p>



<a name="188505750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505750">(Feb 19 2020 at 00:31)</a>:</h4>
<p>HasInterner is part of chalk_ir</p>



<a name="188505759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505759">(Feb 19 2020 at 00:31)</a>:</h4>
<p>and thats not a dep of chalk_engine i guess</p>



<a name="188505767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505767">(Feb 19 2020 at 00:31)</a>:</h4>
<p>I will just add an associated type</p>



<a name="188505856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505856">(Feb 19 2020 at 00:33)</a>:</h4>
<p>ah right</p>



<a name="188505865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505865">(Feb 19 2020 at 00:33)</a>:</h4>
<p>this is gonna be tough</p>



<a name="188505959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505959">(Feb 19 2020 at 00:34)</a>:</h4>
<p>yea this is breaking down pretty bad</p>



<a name="188505961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505961">(Feb 19 2020 at 00:34)</a>:</h4>
<p>My first thought was to put it on <code>TruncatingInferenceTable</code>, but you would need a lifetime, which you can't have because it would need to be a GAT</p>



<a name="188505964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188505964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188505964">(Feb 19 2020 at 00:34)</a>:</h4>
<p>the impl for Forest has no Interner on it</p>



<a name="188506001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506001">(Feb 19 2020 at 00:35)</a>:</h4>
<p>and we use dyn InferenceTables</p>



<a name="188506006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506006">(Feb 19 2020 at 00:35)</a>:</h4>
<p>which require that we specify the associated type</p>



<a name="188506078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506078">(Feb 19 2020 at 00:36)</a>:</h4>
<p>could the Context define the interner?</p>



<a name="188506087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506087">(Feb 19 2020 at 00:37)</a>:</h4>
<p>nope, because <code>Context</code> is in <code>chalk-engine</code></p>



<a name="188506092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506092">(Feb 19 2020 at 00:37)</a>:</h4>
<p>i dont follow</p>



<a name="188506110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506110">(Feb 19 2020 at 00:37)</a>:</h4>
<p>no Interner in the engine</p>



<a name="188506197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506197">(Feb 19 2020 at 00:38)</a>:</h4>
<p>it looks like it worked</p>



<a name="188506207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506207">(Feb 19 2020 at 00:38)</a>:</h4>
<p>let me show you what I meant</p>



<a name="188506210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506210">(Feb 19 2020 at 00:39)</a>:</h4>
<p>im sure im explaining this poorly</p>



<a name="188506235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506235">(Feb 19 2020 at 00:39)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">UnificationOps</span><span class="o">&lt;</span><span class="n">C</span>: <span class="nc">Context</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// Used by: simplify</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">instantiate_binders_universally</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">C</span>::<span class="n">Interner</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">arg</span>: <span class="kp">&amp;</span><span class="nc">C</span>::<span class="n">BindersGoal</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">C</span>::<span class="n">Goal</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="188506242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506242">(Feb 19 2020 at 00:39)</a>:</h4>
<p>i added the Interner associated type to the Context trait</p>



<a name="188506292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506292">(Feb 19 2020 at 00:40)</a>:</h4>
<p>and when Context is defined everything is parameterized on the interner</p>



<a name="188506309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506309">(Feb 19 2020 at 00:40)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">context</span>::<span class="n">Context</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">SlgContext</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalGoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalExClause</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">Self</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">UCanonicalGoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">UCanonical</span><span class="o">&lt;</span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">UniverseMap</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">UniverseMap</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">InferenceNormalizedSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Solution</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Solution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">InferenceTable</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TruncatingInferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Environment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Environment</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">DomainGoal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DomainGoal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Goal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">BindersGoal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Binders</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Parameter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">ProgramClause</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">ProgramClauses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalConstrainedSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">ConstrainedSubst</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">CanonicalAnswerSubst</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">AnswerSubst</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">GoalInEnvironment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Substitution</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">RegionConstraint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">InEnvironment</span><span class="o">&lt;</span><span class="n">Constraint</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Variance</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">I</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="188506330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506330">(Feb 19 2020 at 00:40)</a>:</h4>
<p>so I added that last line for Interner = I</p>



<a name="188506363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506363">(Feb 19 2020 at 00:41)</a>:</h4>
<p>well that works</p>



<a name="188506381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506381">(Feb 19 2020 at 00:41)</a>:</h4>
<p>doing the same thing on this fn</p>



<a name="188506383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506383">(Feb 19 2020 at 00:41)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">C</span>: <span class="nc">Context</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Forest</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Simplifies an HH goal into a series of positive domain goals</span>
<span class="w">    </span><span class="sd">/// and negative HH goals. This operation may fail if the HH goal</span>
<span class="w">    </span><span class="sd">/// includes unifications that cannot be completed.</span>
<span class="w">    </span><span class="k">pub</span><span class="p">(</span><span class="k">super</span><span class="p">)</span><span class="w"> </span><span class="k">fn</span> <span class="nf">simplify_hh_goal</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">C</span>::<span class="n">Interner</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">infer</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">dyn</span><span class="w"> </span><span class="n">InferenceTable</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">subst</span>: <span class="nc">C</span>::<span class="n">Substitution</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">initial_environment</span>: <span class="nc">C</span>::<span class="n">Environment</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">initial_hh_goal</span>: <span class="nc">HhGoal</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188506387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506387">(Feb 19 2020 at 00:42)</a>:</h4>
<p>i added an interner arg</p>



<a name="188506431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506431">(Feb 19 2020 at 00:42)</a>:</h4>
<p>lmk if you think it should be a member of the Forest instead</p>



<a name="188506447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506447">(Feb 19 2020 at 00:42)</a>:</h4>
<p>or maybe a getter fn on <code>Context</code></p>



<a name="188506474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506474">(Feb 19 2020 at 00:43)</a>:</h4>
<p>if it were a getter fn on Context that would make this all very easy</p>



<a name="188506533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506533">(Feb 19 2020 at 00:44)</a>:</h4>
<p>on <code>ContextOps</code>?</p>



<a name="188506663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506663">(Feb 19 2020 at 00:46)</a>:</h4>
<p>On either, but that would probably be the best</p>



<a name="188506671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506671">(Feb 19 2020 at 00:46)</a>:</h4>
<p>like here for example</p>



<a name="188506672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506672">(Feb 19 2020 at 00:46)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">push_initial_strands</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">context</span>: <span class="kp">&amp;</span><span class="nc">impl</span><span class="w"> </span><span class="n">ContextOps</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">table</span>: <span class="nc">TableIndex</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Instantiate the table goal with fresh inference variables.</span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">table_goal</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">tables</span><span class="p">[</span><span class="n">table</span><span class="p">].</span><span class="n">table_goal</span><span class="p">.</span><span class="n">clone</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="p">(</span><span class="n">infer</span><span class="p">,</span><span class="w"> </span><span class="n">subst</span><span class="p">,</span><span class="w"> </span><span class="n">environment</span><span class="p">,</span><span class="w"> </span><span class="n">goal</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">context</span><span class="p">.</span><span class="n">instantiate_ucanonical_goal</span><span class="p">(</span><span class="o">&amp;</span><span class="n">table_goal</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">push_initial_strands_instantiated</span><span class="p">(</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">infer</span><span class="p">,</span><span class="w"> </span><span class="n">subst</span><span class="p">,</span><span class="w"> </span><span class="n">environment</span><span class="p">,</span><span class="w"> </span><span class="n">goal</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188506679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506679">(Feb 19 2020 at 00:46)</a>:</h4>
<p>we have a ContextOps arg already</p>



<a name="188506759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506759">(Feb 19 2020 at 00:48)</a>:</h4>
<p>oh duh we already have the getter on ContextOps technically</p>



<a name="188506760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506760">(Feb 19 2020 at 00:48)</a>:</h4>
<p>via its program member</p>



<a name="188506798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506798">(Feb 19 2020 at 00:49)</a>:</h4>
<p>yeah</p>



<a name="188506804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506804">(Feb 19 2020 at 00:49)</a>:</h4>
<p>adding a getter to <code>ContextOps</code> is probably okay</p>



<a name="188506877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506877">(Feb 19 2020 at 00:50)</a>:</h4>
<p>yea, doing that, cannot access the program member when the context type is behind the generic</p>



<a name="188506959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506959">(Feb 19 2020 at 00:53)</a>:</h4>
<p>damnit</p>



<a name="188506968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506968">(Feb 19 2020 at 00:53)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">C</span>: <span class="nc">HasInterner</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Context</span><span class="o">&gt;</span><span class="w"> </span><span class="n">HasInterner</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">C</span>::<span class="n">Interner</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188506970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506970">(Feb 19 2020 at 00:53)</a>:</h4>
<p>conflict</p>



<a name="188506996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188506996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188506996">(Feb 19 2020 at 00:53)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">C</span>: <span class="nc">HasInterner</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Context</span><span class="o">&gt;</span><span class="w"> </span><span class="n">HasInterner</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&lt;</span><span class="n">C</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">HasInterner</span><span class="o">&gt;</span>::<span class="n">Interner</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188507035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507035">(Feb 19 2020 at 00:54)</a>:</h4>
<p>assuming this is Okay</p>



<a name="188507059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507059">(Feb 19 2020 at 00:54)</a>:</h4>
<p>yep</p>



<a name="188507063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507063">(Feb 19 2020 at 00:55)</a>:</h4>
<p>theoretically, they're the same</p>



<a name="188507081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507081">(Feb 19 2020 at 00:55)</a>:</h4>
<p>Okay thats done i think!</p>



<a name="188507083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507083">(Feb 19 2020 at 00:55)</a>:</h4>
<p>the slg stuff at least</p>



<a name="188507086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507086">(Feb 19 2020 at 00:56)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">aggregate_application_tys</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">apply1</span>: <span class="kp">&amp;</span><span class="nc">ApplicationTy</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">apply2</span>: <span class="kp">&amp;</span><span class="nc">ApplicationTy</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188507126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507126">(Feb 19 2020 at 00:56)</a>:</h4>
<p>this needs an interner</p>



<a name="188507128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507128">(Feb 19 2020 at 00:56)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">AntiUnifier</span><span class="o">&lt;</span><span class="na">&#39;infer</span><span class="p">,</span><span class="w"> </span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">infer</span>: <span class="kp">&amp;</span><span class="na">&#39;infer</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">InferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">universe</span>: <span class="nc">UniverseIndex</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188507130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507130">(Feb 19 2020 at 00:56)</a>:</h4>
<p>arg?</p>



<a name="188507151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507151">(Feb 19 2020 at 00:56)</a>:</h4>
<p>probably a field</p>



<a name="188507160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507160">(Feb 19 2020 at 00:57)</a>:</h4>
<p>oh okay</p>



<a name="188507166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507166">(Feb 19 2020 at 00:57)</a>:</h4>
<p>btw about to be on mobile. So I can probably still respond, but can't check code</p>



<a name="188507172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507172">(Feb 19 2020 at 00:57)</a>:</h4>
<p>(unless you post it here :P)</p>



<a name="188507310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507310">(Feb 19 2020 at 01:00)</a>:</h4>
<p>okay</p>



<a name="188507337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507337">(Feb 19 2020 at 01:00)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">context</span>::<span class="n">ResolventOps</span><span class="o">&lt;</span><span class="n">SlgContext</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">TruncatingInferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// Applies the SLG resolvent algorithm to incorporate a program</span>
<span class="w">    </span><span class="sd">/// clause into the main X-clause, producing a new X-clause that</span>
<span class="w">    </span><span class="sd">/// must be solved.</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// # Parameters</span>
<span class="w">    </span><span class="sd">///</span>
<span class="w">    </span><span class="sd">/// - `goal` is the goal G that we are trying to solve</span>
<span class="w">    </span><span class="sd">/// - `clause` is the program clause that may be useful to that end</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">resolvent_clause</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">environment</span>: <span class="kp">&amp;</span><span class="nc">Environment</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">goal</span>: <span class="kp">&amp;</span><span class="nc">DomainGoal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">subst</span>: <span class="kp">&amp;</span><span class="nc">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">clause</span>: <span class="kp">&amp;</span><span class="nc">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">ExClause</span><span class="o">&lt;</span><span class="n">SlgContext</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188507344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507344">(Feb 19 2020 at 01:00)</a>:</h4>
<p>need an interner here</p>



<a name="188507365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507365">(Feb 19 2020 at 01:00)</a>:</h4>
<p>arg im guessing</p>



<a name="188507395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507395">(Feb 19 2020 at 01:01)</a>:</h4>
<p>that worked well</p>



<a name="188507397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507397">(Feb 19 2020 at 01:01)</a>:</h4>
<p>Probably same UnificationOps</p>



<a name="188507484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507484">(Feb 19 2020 at 01:03)</a>:</h4>
<p>okay</p>



<a name="188507486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507486">(Feb 19 2020 at 01:03)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">merge_answer_into_strand</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">strand</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Strand</span><span class="o">&lt;</span><span class="n">C</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">RootSearchResult</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188507488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507488">(Feb 19 2020 at 01:03)</a>:</h4>
<p>this needs an interner</p>



<a name="188507491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507491">(Feb 19 2020 at 01:04)</a>:</h4>
<p>should I add a ContextOps arg?</p>



<a name="188507565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507565">(Feb 19 2020 at 01:05)</a>:</h4>
<p>or can Strand somehow pass it along</p>



<a name="188507575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507575">(Feb 19 2020 at 01:05)</a>:</h4>
<p>going ahead and adding a context arg</p>



<a name="188507719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507719">(Feb 19 2020 at 01:08)</a>:</h4>
<p>okay i think thats that path done</p>



<a name="188507721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507721">(Feb 19 2020 at 01:08)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">Truncater</span><span class="o">&lt;</span><span class="na">&#39;infer</span><span class="p">,</span><span class="w"> </span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">infer</span>: <span class="kp">&amp;</span><span class="na">&#39;infer</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">InferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">current_size</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">max_size</span>: <span class="kt">usize</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">overflow</span>: <span class="kt">bool</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;infer</span><span class="p">,</span><span class="w"> </span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Truncater</span><span class="o">&lt;</span><span class="na">&#39;infer</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">new</span><span class="p">(</span><span class="n">infer</span>: <span class="kp">&amp;</span><span class="na">&#39;infer</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">InferenceTable</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">max_size</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">Truncater</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">infer</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">current_size</span>: <span class="mi">0</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">max_size</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">overflow</span>: <span class="nc">false</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">overflow</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">pre_size</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">overflow</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">current_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">pre_size</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">universe</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">infer</span><span class="p">.</span><span class="n">max_universe</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">infer</span><span class="p">.</span><span class="n">new_variable</span><span class="p">(</span><span class="n">universe</span><span class="p">).</span><span class="n">to_ty</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188507724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507724">(Feb 19 2020 at 01:08)</a>:</h4>
<p>need an interner for overflow</p>



<a name="188507726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507726">(Feb 19 2020 at 01:08)</a>:</h4>
<p>arg?</p>



<a name="188507736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507736">(Feb 19 2020 at 01:08)</a>:</h4>
<p>this thing impls Folder</p>



<a name="188507741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507741">(Feb 19 2020 at 01:08)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">interner</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="nc">I</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">target_interner</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="nc">I</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188507751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507751">(Feb 19 2020 at 01:09)</a>:</h4>
<p>I can probably just use that</p>



<a name="188507766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507766">(Feb 19 2020 at 01:09)</a>:</h4>
<p>Yep</p>



<a name="188507772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507772">(Feb 19 2020 at 01:09)</a>:</h4>
<p>Good so far!</p>



<a name="188507817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507817">(Feb 19 2020 at 01:10)</a>:</h4>
<div class="codehilite"><pre><span></span>
</pre></div>



<a name="188507819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507819">(Feb 19 2020 at 01:10)</a>:</h4>
<p>impl&lt;I: Interner&gt; FoldInputTypes for AliasEq&lt;I&gt; {<br>
    fn fold(&amp;self, accumulator: &amp;mut Vec&lt;Ty&lt;I&gt;&gt;) {<br>
        TyData::Alias(self.alias.clone()).intern().fold(accumulator);<br>
        self.ty.fold(accumulator);<br>
    }<br>
}</p>



<a name="188507821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507821">(Feb 19 2020 at 01:10)</a>:</h4>
<p>gdi</p>



<a name="188507822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507822">(Feb 19 2020 at 01:10)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="err">```</span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FoldInputTypes</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">AliasEq</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">fold</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">accumulator</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">TyData</span>::<span class="n">Alias</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">alias</span><span class="p">.</span><span class="n">clone</span><span class="p">()).</span><span class="n">intern</span><span class="p">().</span><span class="n">fold</span><span class="p">(</span><span class="n">accumulator</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">ty</span><span class="p">.</span><span class="n">fold</span><span class="p">(</span><span class="n">accumulator</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188507825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507825">(Feb 19 2020 at 01:10)</a>:</h4>
<p>close enough</p>



<a name="188507829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507829">(Feb 19 2020 at 01:10)</a>:</h4>
<p>this needs an interner</p>



<a name="188507835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507835">(Feb 19 2020 at 01:10)</a>:</h4>
<p>arg on fold? getter fn on trait?</p>



<a name="188507845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507845">(Feb 19 2020 at 01:11)</a>:</h4>
<p>Uh</p>



<a name="188507851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507851">(Feb 19 2020 at 01:11)</a>:</h4>
<p>I only have 2 more errors left atm</p>



<a name="188507852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507852">(Feb 19 2020 at 01:11)</a>:</h4>
<p>Getter on trait probably</p>



<a name="188507855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507855">(Feb 19 2020 at 01:11)</a>:</h4>
<p>okay</p>



<a name="188507913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507913">(Feb 19 2020 at 01:12)</a>:</h4>
<p>Err, maybe rags</p>



<a name="188507916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507916">(Feb 19 2020 at 01:12)</a>:</h4>
<p>Arg</p>



<a name="188507935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507935">(Feb 19 2020 at 01:13)</a>:</h4>
<p>oooo shit a lot of ppl implement this trait</p>



<a name="188507958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507958">(Feb 19 2020 at 01:13)</a>:</h4>
<p>none of the other impls need an interner</p>



<a name="188507971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188507971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188507971">(Feb 19 2020 at 01:13)</a>:</h4>
<p>at least with the change I've made so far</p>



<a name="188508013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508013">(Feb 19 2020 at 01:14)</a>:</h4>
<p>Oof</p>



<a name="188508042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508042">(Feb 19 2020 at 01:14)</a>:</h4>
<p>just gonna do an associated fn on the type</p>



<a name="188508045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508045">(Feb 19 2020 at 01:15)</a>:</h4>
<p>knowing its wrong</p>



<a name="188508054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508054">(Feb 19 2020 at 01:15)</a>:</h4>
<p>and punt on the issue for a hot second</p>



<a name="188508068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508068">(Feb 19 2020 at 01:15)</a>:</h4>
<p>Yeah, that's fine</p>



<a name="188508122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508122">(Feb 19 2020 at 01:16)</a>:</h4>
<p>ooh shit!</p>



<a name="188508125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508125">(Feb 19 2020 at 01:16)</a>:</h4>
<p>we got to the borrow checker pass</p>



<a name="188508156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508156">(Feb 19 2020 at 01:17)</a>:</h4>
<p><span aria-label="raised hands" class="emoji emoji-1f64c" role="img" title="raised hands">:raised_hands:</span></p>



<a name="188508212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508212">(Feb 19 2020 at 01:19)</a>:</h4>
<p>okay</p>



<a name="188508215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508215">(Feb 19 2020 at 01:19)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">RustIrDatabase</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">ChalkDatabase</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188508218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508218">(Feb 19 2020 at 01:19)</a>:</h4>
<p>I have to impl the <code>interner</code> getter for RustIrDatabase</p>



<a name="188508221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508221">(Feb 19 2020 at 01:19)</a>:</h4>
<p>but theres no interner type here</p>



<a name="188508223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508223">(Feb 19 2020 at 01:19)</a>:</h4>
<p>presumably ChalkDatabase will own the interner or something?</p>



<a name="188508224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508224">(Feb 19 2020 at 01:19)</a>:</h4>
<p>(not sure)</p>



<a name="188508274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508274">(Feb 19 2020 at 01:20)</a>:</h4>
<p>ChalkIr</p>



<a name="188508292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508292">(Feb 19 2020 at 01:20)</a>:</h4>
<p>Probably</p>



<a name="188508304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508304">(Feb 19 2020 at 01:21)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">LowerParameterMap</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">synthetic_parameters</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">ParameterKind</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">Identifier</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">declared_parameters</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="p">[</span><span class="n">ParameterKind</span><span class="p">];</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">all_parameters</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">ParameterKind</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">Identifier</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">synthetic_parameters</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">into_iter</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">chain</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">declared_parameters</span><span class="p">().</span><span class="n">iter</span><span class="p">().</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">id</span><span class="o">|</span><span class="w"> </span><span class="n">id</span><span class="p">.</span><span class="n">lower</span><span class="p">()))</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">collect</span><span class="p">()</span><span class="w"></span>

<span class="w">        </span><span class="cm">/* TODO: switch to this ordering, but adjust *all* the code to match</span>

<span class="cm">        self.declared_parameters()</span>
<span class="cm">            .iter()</span>
<span class="cm">            .map(|id| id.lower())</span>
<span class="cm">            .chain(self.synthetic_parameters()) // (*) see below</span>
<span class="cm">            .collect()</span>
<span class="cm">         */</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">parameter_refs</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">Parameter</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">all_parameters</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">anonymize</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">iter</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">zip</span><span class="p">(</span><span class="mi">0</span><span class="p">..)</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">p</span><span class="o">|</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">to_parameter</span><span class="p">())</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">collect</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188508329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508329">(Feb 19 2020 at 01:22)</a>:</h4>
<p>parameter_refs needs an Interner</p>



<a name="188508353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508353">(Feb 19 2020 at 01:22)</a>:</h4>
<p>Maybe getter on trait</p>



<a name="188508356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508356">(Feb 19 2020 at 01:22)</a>:</h4>
<p>okay</p>



<a name="188508357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508357">(Feb 19 2020 at 01:22)</a>:</h4>
<p>Brb</p>



<a name="188508380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508380">(Feb 19 2020 at 01:23)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">LowerTy</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">lower</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">env</span>: <span class="kp">&amp;</span><span class="nc">Env</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">LowerResult</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">Ty</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">LowerTy</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Ty</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">lower</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">env</span>: <span class="kp">&amp;</span><span class="nc">Env</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">LowerResult</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">Ty</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="o">*</span><span class="bp">self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">Ty</span>::<span class="n">Id</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">env</span><span class="p">.</span><span class="n">lookup_type</span><span class="p">(</span><span class="n">name</span><span class="p">)</span><span class="o">?</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">TypeLookup</span>::<span class="n">Struct</span><span class="p">(</span><span class="n">id</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">k</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">env</span><span class="p">.</span><span class="n">struct_kind</span><span class="p">(</span><span class="n">id</span><span class="p">);</span><span class="w"></span>
<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="n">k</span><span class="p">.</span><span class="n">binders</span><span class="p">.</span><span class="n">len</span><span class="p">()</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">Err</span><span class="p">(</span><span class="n">RustIrError</span>::<span class="n">IncorrectNumberOfTypeParameters</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">identifier</span>: <span class="nc">name</span><span class="p">,</span><span class="w"></span>
<span class="w">                            </span><span class="n">expected</span>: <span class="nc">k</span><span class="p">.</span><span class="n">binders</span><span class="p">.</span><span class="n">len</span><span class="p">(),</span><span class="w"></span>
<span class="w">                            </span><span class="n">actual</span>: <span class="mi">0</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="p">})</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">Ok</span><span class="p">(</span><span class="n">chalk_ir</span>::<span class="n">TyData</span>::<span class="n">Apply</span><span class="p">(</span><span class="n">chalk_ir</span>::<span class="n">ApplicationTy</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">name</span>: <span class="nc">chalk_ir</span>::<span class="n">TypeName</span>::<span class="n">Struct</span><span class="p">(</span><span class="n">id</span><span class="p">),</span><span class="w"></span>
<span class="w">                            </span><span class="n">substitution</span>: <span class="nc">chalk_ir</span>::<span class="n">Substitution</span>::<span class="n">empty</span><span class="p">(),</span><span class="w"></span>
<span class="w">                        </span><span class="p">})</span><span class="w"></span>
<span class="w">                        </span><span class="p">.</span><span class="n">intern</span><span class="p">())</span><span class="w"></span>
</pre></div>



<a name="188508381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508381">(Feb 19 2020 at 01:23)</a>:</h4>
<p>alrighty</p>



<a name="188508435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508435">(Feb 19 2020 at 01:24)</a>:</h4>
<p>gonna afk for a bit / work on other things</p>



<a name="188508438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508438">(Feb 19 2020 at 01:25)</a>:</h4>
<p>msg me when you're back</p>



<a name="188508543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508543">(Feb 19 2020 at 01:27)</a>:</h4>
<p>Back</p>



<a name="188508553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508553">(Feb 19 2020 at 01:27)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span></p>



<a name="188508613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188508613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188508613">(Feb 19 2020 at 01:28)</a>:</h4>
<p>Probably a function arg there</p>



<a name="188509741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188509741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188509741">(Feb 19 2020 at 01:54)</a>:</h4>
<p>okay</p>



<a name="188509776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188509776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188509776">(Feb 19 2020 at 01:55)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span></p>



<a name="188509777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188509777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188509777">(Feb 19 2020 at 01:55)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">LowerProgram</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Program</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">lower</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">LowerResult</span><span class="o">&lt;</span><span class="n">LoweredProgram</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="188510710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510710">(Feb 19 2020 at 02:20)</a>:</h4>
<p>Maybe same?</p>



<a name="188510767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510767">(Feb 19 2020 at 02:22)</a>:</h4>
<p>alrighty</p>



<a name="188510860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510860">(Feb 19 2020 at 02:24)</a>:</h4>
<p>I'm gonna assume the same and just keep slapping interner args on all the lowering stuff</p>



<a name="188510862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510862">(Feb 19 2020 at 02:24)</a>:</h4>
<p>like this</p>



<a name="188510863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510863">(Feb 19 2020 at 02:24)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="w"> </span><span class="n">LowerWhereClauseVec</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="n">QuantifiedWhereClause</span><span class="p">]</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">lower</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">env</span>: <span class="kp">&amp;</span><span class="nc">Env</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">LowerResult</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">chalk_ir</span>::<span class="n">QuantifiedWhereClause</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">iter</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">flat_map</span><span class="p">(</span><span class="o">|</span><span class="n">wc</span><span class="o">|</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">wc</span><span class="p">.</span><span class="n">lower</span><span class="p">(</span><span class="n">env</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="nb">Ok</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">into_iter</span><span class="p">().</span><span class="n">map</span><span class="p">(</span><span class="nb">Ok</span><span class="p">).</span><span class="n">collect</span><span class="p">(),</span><span class="w"></span>
<span class="w">                </span><span class="nb">Err</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">vec</span><span class="o">!</span><span class="p">[</span><span class="nb">Err</span><span class="p">(</span><span class="n">e</span><span class="p">)],</span><span class="w"></span>
<span class="w">            </span><span class="p">})</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">collect</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188510939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510939">(Feb 19 2020 at 02:26)</a>:</h4>
<p>Yeah that's good</p>



<a name="188510944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188510944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188510944">(Feb 19 2020 at 02:26)</a>:</h4>
<p>Can always change it if needed</p>



<a name="188511415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511415">(Feb 19 2020 at 02:39)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> ```rust</p>



<a name="188511416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511416">(Feb 19 2020 at 02:39)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">program_ir</span><span class="p">(</span><span class="n">db</span>: <span class="kp">&amp;</span><span class="nc">impl</span><span class="w"> </span><span class="n">LoweringDatabase</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">Arc</span><span class="o">&lt;</span><span class="n">Program</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ChalkError</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">db</span><span class="p">.</span><span class="n">program_text</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="nb">Ok</span><span class="p">(</span><span class="n">Arc</span>::<span class="n">new</span><span class="p">(</span><span class="n">chalk_parse</span>::<span class="n">parse_program</span><span class="p">(</span><span class="o">&amp;</span><span class="n">text</span><span class="p">)</span><span class="o">?</span><span class="p">.</span><span class="n">lower</span><span class="p">(</span><span class="n">interner</span><span class="p">)</span><span class="o">?</span><span class="p">))</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188511417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511417">(Feb 19 2020 at 02:39)</a>:</h4>
<p>need an interner there</p>



<a name="188511421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511421">(Feb 19 2020 at 02:39)</a>:</h4>
<p>i initially slapped it on as an arg</p>



<a name="188511463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511463">(Feb 19 2020 at 02:40)</a>:</h4>
<p>but that propogated back up and caused lifetime issues</p>



<a name="188511471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511471">(Feb 19 2020 at 02:40)</a>:</h4>
<p>Maybe on LoweringDatabase then?</p>



<a name="188511541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511541">(Feb 19 2020 at 02:42)</a>:</h4>
<p>also i had absolutely no idea this syntax was allowed</p>



<a name="188511557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511557">(Feb 19 2020 at 02:42)</a>:</h4>
<p>impling trait items as free fns</p>



<a name="188511641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511641">(Feb 19 2020 at 02:44)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">program_ir</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="n">ChalkIr</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">Arc</span><span class="o">&lt;</span><span class="n">Program</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ChalkError</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="188511642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511642">(Feb 19 2020 at 02:44)</a>:</h4>
<p>it doesn't want to accept this</p>



<a name="188511649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511649">(Feb 19 2020 at 02:45)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="n">chalk</span><span class="o">-</span><span class="n">integration</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">query</span><span class="p">.</span><span class="n">rs</span><span class="o">|</span><span class="mi">31</span><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="mi">41</span><span class="w"> </span><span class="n">error</span><span class="w"> </span><span class="mi">261</span><span class="o">|</span><span class="w"> </span><span class="k">use</span><span class="w"> </span><span class="n">of</span><span class="w"> </span><span class="n">undeclared</span><span class="w"> </span><span class="n">lifetime</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="err">`</span><span class="na">&#39;a</span><span class="err">`</span><span class="w"></span>
<span class="o">||</span><span class="w">    </span><span class="o">|</span><span class="w"></span>
<span class="o">||</span><span class="w"> </span><span class="mi">31</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="k">fn</span> <span class="nf">program_ir</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="n">ChalkIr</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">Arc</span><span class="o">&lt;</span><span class="n">Program</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ChalkError</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="o">||</span><span class="w">    </span><span class="o">|</span><span class="w">                                         </span><span class="o">^^</span><span class="w"> </span><span class="n">undeclared</span><span class="w"> </span><span class="n">lifetime</span><span class="w"></span>
<span class="o">||</span><span class="w"> </span><span class="n">For</span><span class="w"> </span><span class="n">more</span><span class="w"> </span><span class="n">information</span><span class="w"> </span><span class="n">about</span><span class="w"> </span><span class="n">this</span><span class="w"> </span><span class="n">error</span><span class="p">,</span><span class="w"> </span><span class="k">try</span><span class="w"> </span><span class="err">`</span><span class="n">rustc</span><span class="w"> </span><span class="o">--</span><span class="n">explain</span><span class="w"> </span><span class="n">E0261</span><span class="err">`</span><span class="p">.</span><span class="w"></span>
</pre></div>



<a name="188511656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511656">(Feb 19 2020 at 02:45)</a>:</h4>
<p>can you not declare lifetimes on associated fns for traits</p>



<a name="188511678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511678">(Feb 19 2020 at 02:46)</a>:</h4>
<p>Hmm</p>



<a name="188511714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511714">(Feb 19 2020 at 02:46)</a>:</h4>
<p>Weird</p>



<a name="188511724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511724">(Feb 19 2020 at 02:46)</a>:</h4>
<p>I have to get off for the night though</p>



<a name="188511739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188511739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188511739">(Feb 19 2020 at 02:46)</a>:</h4>
<p>okay</p>



<a name="188512181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512181">(Feb 19 2020 at 03:01)</a>:</h4>
<p>eyyy, i got it compiling</p>



<a name="188512182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512182">(Feb 19 2020 at 03:01)</a>:</h4>
<p>with liberal usage of <code>unimplemented!()</code></p>



<a name="188512183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512183">(Feb 19 2020 at 03:01)</a>:</h4>
<p>the lowering stuff is almost certainly wrong</p>



<a name="188512184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512184">(Feb 19 2020 at 03:01)</a>:</h4>
<p>i mostly yoloed it</p>



<a name="188512227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512227">(Feb 19 2020 at 03:02)</a>:</h4>
<p>and I intentionally hacked it so src/main.rs wouldn't need to know about the Interner</p>



<a name="188512311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512311">(Feb 19 2020 at 03:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> this is probably far enough along where you can do code review and leave comments rather than doing synchronous help via chat</p>



<a name="188512312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512312">(Feb 19 2020 at 03:04)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/330/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/330/files">https://github.com/rust-lang/chalk/pull/330/files</a></p>



<a name="188512372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512372">(Feb 19 2020 at 03:06)</a>:</h4>
<p>the changes in <code>chalk-integration</code> are the most suspect / in need of review</p>



<a name="188512375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512375">(Feb 19 2020 at 03:06)</a>:</h4>
<p>so thats probably a good place to start the code review</p>



<a name="188512385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188512385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188512385">(Feb 19 2020 at 03:07)</a>:</h4>
<p>I haven't bothered making the tests compile yet</p>



<a name="188522412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188522412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188522412">(Feb 19 2020 at 07:57)</a>:</h4>
<p>In <code>lowering.rs</code>, you're passing both the interner and the env to most functions. Shouldn't we add the interner to Env?</p>



<a name="188548498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188548498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188548498">(Feb 19 2020 at 14:28)</a>:</h4>
<p>Yeah, would work well</p>



<a name="188570604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188570604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188570604">(Feb 19 2020 at 18:25)</a>:</h4>
<p>k moved it into env</p>



<a name="188572968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188572968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188572968">(Feb 19 2020 at 18:53)</a>:</h4>
<p>ready for more review, I left a comment on the AliasEq stuff, don't know how to move forward on that, and I have a bunch of <code>interner() -&gt; &amp;I { unimplemented!() }</code> fns that I need to deal with</p>



<a name="188572982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188572982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188572982">(Feb 19 2020 at 18:53)</a>:</h4>
<p>so guidance on how to deal with those would be a good next step</p>



<a name="188573307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188573307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188573307">(Feb 19 2020 at 18:57)</a>:</h4>
<p>Just replied to your comment re. <code>AliasEq</code>. As tough as it is (since the other impls of that trait don't need an <code>Interner</code>), I do think providing the interner as an arg is the right choice</p>



<a name="188573408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188573408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188573408">(Feb 19 2020 at 18:58)</a>:</h4>
<p>As far as the <code>unimplemented!()</code>s, most will probably just coming from a new field on the struct</p>



<a name="188787937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188787937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188787937">(Feb 22 2020 at 00:23)</a>:</h4>
<p>Most important question of all</p>



<a name="188787945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188787945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188787945">(Feb 22 2020 at 00:23)</a>:</h4>
<p>who should own the interner?</p>



<a name="188787956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188787956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188787956">(Feb 22 2020 at 00:23)</a>:</h4>
<p>I feel like if I know where the concrete references to the interner are coming from a lot of this will fall into place</p>



<a name="188788002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188788002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188788002">(Feb 22 2020 at 00:24)</a>:</h4>
<p>btw gonna start adding interner arg to the trait that AliasEq needs it on</p>



<a name="188788736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188788736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188788736">(Feb 22 2020 at 00:41)</a>:</h4>
<p>K i pushed a version that adds the interner to the FoldInputTypes trait</p>



<a name="188788756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188788756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188788756">(Feb 22 2020 at 00:41)</a>:</h4>
<p>I think right now the main things left to do are start actually populating the various items I added <code>interner()</code> fns to with actual references to interner</p>



<a name="188948207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188948207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188948207">(Feb 24 2020 at 17:40)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> very sorry for disappearing last week</p>



<a name="188948212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188948212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188948212">(Feb 24 2020 at 17:40)</a>:</h4>
<p>let me see if I can catch up...</p>



<a name="188948256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188948256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188948256">(Feb 24 2020 at 17:40)</a>:</h4>
<p>is <a href="https://github.com/rust-lang-nursery/chalk/issues/330" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/330">chalk#330</a> the latest?</p>



<a name="188949232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949232">(Feb 24 2020 at 17:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yea, I believe its completely up to date with the changes I've made</p>



<a name="188949240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949240">(Feb 24 2020 at 17:53)</a>:</h4>
<p>comments from above are where I left off</p>



<a name="188949243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949243">(Feb 24 2020 at 17:53)</a>:</h4>
<p>great, ok</p>



<a name="188949292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949292">(Feb 24 2020 at 17:54)</a>:</h4>
<p>I think the question of "who should own" is definitely key-- I also think that probably it should be firmly borrowed and temporary, even though that's less convenient</p>



<a name="188949309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949309">(Feb 24 2020 at 17:54)</a>:</h4>
<p>but I think it'll fit best into the salsa model</p>



<a name="188949323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949323">(Feb 24 2020 at 17:54)</a>:</h4>
<p>firmly borrowed?</p>



<a name="188949337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949337">(Feb 24 2020 at 17:54)</a>:</h4>
<p>heh, not sure what "firmly" means :)</p>



<a name="188949341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949341">(Feb 24 2020 at 17:54)</a>:</h4>
<p>yea me neither</p>



<a name="188949343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949343">(Feb 24 2020 at 17:54)</a>:</h4>
<p>lol</p>



<a name="188949371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949371">(Feb 24 2020 at 17:55)</a>:</h4>
<p>well I mean that it should be passed in as a parameter and we shouldn't be able to clone it</p>



<a name="188949376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949376">(Feb 24 2020 at 17:55)</a>:</h4>
<p>or take ownership of it</p>



<a name="188949379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949379">(Feb 24 2020 at 17:55)</a>:</h4>
<p>so I guess "strictly"</p>



<a name="188949391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949391">(Feb 24 2020 at 17:55)</a>:</h4>
<p>but let me check out the PR and see how it feels</p>



<a name="188949422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949422">(Feb 24 2020 at 17:55)</a>:</h4>
<p>this means that potentially "long lived" data structures shouldn't have an <code>Interner</code> in their fields</p>



<a name="188949521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949521">(Feb 24 2020 at 17:56)</a>:</h4>
<p>okay</p>



<a name="188949543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188949543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188949543">(Feb 24 2020 at 17:56)</a>:</h4>
<p>if you search for instances of <code>interner(&amp;self)</code> that will give you a good idea of who currently would need to borrow it with the guesses we took at how to thread it through</p>



<a name="188951473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188951473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188951473">(Feb 24 2020 at 18:20)</a>:</h4>
<p>(removed)</p>



<a name="188951810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188951810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188951810">(Feb 24 2020 at 18:25)</a>:</h4>
<p>Yes, so the interner, I assume, would get passed in at <code>solve</code></p>



<a name="188951829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188951829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188951829">(Feb 24 2020 at 18:25)</a>:</h4>
<p>similar to <code>RustIrDatabase</code></p>



<a name="188952667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952667">(Feb 24 2020 at 18:35)</a>:</h4>
<p>so LoadedProgram should own an interner?</p>



<a name="188952690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952690">(Feb 24 2020 at 18:35)</a>:</h4>
<p>also, what about the target_interner</p>



<a name="188952702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952702">(Feb 24 2020 at 18:36)</a>:</h4>
<p>the fold trait needed two interners, not sure how the second one gets threaded through</p>



<a name="188952911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952911">(Feb 24 2020 at 18:38)</a>:</h4>
<p>I would have to double check. There's two (main) places in the current code where we are "creating" an interner: the tests, and the repl</p>



<a name="188952934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952934">(Feb 24 2020 at 18:38)</a>:</h4>
<p>can't say for sure about either until I look at the code, which I can't do until later</p>



<a name="188952951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188952951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188952951">(Feb 24 2020 at 18:38)</a>:</h4>
<p>As far as target_interner, no clue. Will have to look later</p>



<a name="188954253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954253">(Feb 24 2020 at 18:53)</a>:</h4>
<p>okay so I'm trying to thread an interner from LoadedProgram to Env in <a href="http://lowering.rs" target="_blank" title="http://lowering.rs">lowering.rs</a></p>



<a name="188954278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954278">(Feb 24 2020 at 18:53)</a>:</h4>
<p>and it requires that i add a lifetime param to Program</p>



<a name="188954285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954285">(Feb 24 2020 at 18:53)</a>:</h4>
<p>which is being difficult...</p>



<a name="188954578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954578">(Feb 24 2020 at 18:56)</a>:</h4>
<p>I think the salsa stuff might be responsible</p>



<a name="188954617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954617">(Feb 24 2020 at 18:57)</a>:</h4>
<p>but no matter what I do I get errors saying the lifetimes are undeclared</p>



<a name="188954861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188954861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188954861">(Feb 24 2020 at 18:59)</a>:</h4>
<p>let me look at this a bit later and I'll get back to you</p>



<a name="188955004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188955004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188955004">(Feb 24 2020 at 19:00)</a>:</h4>
<p>okay</p>



<a name="188955018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188955018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188955018">(Feb 24 2020 at 19:00)</a>:</h4>
<p>i was gonna just run it through cargo expand to see what the proc macro was generating</p>



<a name="188955117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188955117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188955117">(Feb 24 2020 at 19:02)</a>:</h4>
<p>I'm hoping its as simple as forgetting to parse / re-add the generic parameters when its transforming the trait definition</p>



<a name="188955173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188955173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188955173">(Feb 24 2020 at 19:02)</a>:</h4>
<p>which is something I'm pretty sure I can fix</p>



<a name="188955287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188955287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188955287">(Feb 24 2020 at 19:03)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">program_ir</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">key0</span>: <span class="kp">&amp;</span><span class="na">&#39;i</span><span class="w"> </span><span class="n">ChalkIr</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">Arc</span><span class="o">&lt;</span><span class="n">Program</span><span class="o">&lt;</span><span class="na">&#39;i</span><span class="o">&gt;&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ChalkError</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="188958023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958023">(Feb 24 2020 at 19:33)</a>:</h4>
<p>I think I fixed it in salsa-macros</p>



<a name="188958030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958030">(Feb 24 2020 at 19:33)</a>:</h4>
<p>damnit apparently not</p>



<a name="188958033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958033">(Feb 24 2020 at 19:33)</a>:</h4>
<p>fff</p>



<a name="188958123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958123">(Feb 24 2020 at 19:34)</a>:</h4>
<p>apparently chalk-integration and chalk both have salsa deps</p>



<a name="188958129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958129">(Feb 24 2020 at 19:34)</a>:</h4>
<p>had to update path</p>



<a name="188958134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958134">(Feb 24 2020 at 19:34)</a>:</h4>
<p>pls work pls work pls work</p>



<a name="188958204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958204">(Feb 24 2020 at 19:35)</a>:</h4>
<p>wooo progress, custom attribute panicked :)</p>



<a name="188958386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958386">(Feb 24 2020 at 19:37)</a>:</h4>
<p>aaah shit, chalk depends on an 0.10.0 version of salsa-macros</p>



<a name="188958399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958399">(Feb 24 2020 at 19:37)</a>:</h4>
<p>and the volatile attribute was removed in 0.14 i guess</p>



<a name="188958403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958403">(Feb 24 2020 at 19:37)</a>:</h4>
<p>so this isnt even my fault</p>



<a name="188958405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958405">(Feb 24 2020 at 19:37)</a>:</h4>
<p>lol</p>



<a name="188958693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958693">(Feb 24 2020 at 19:41)</a>:</h4>
<p>aaaand now rand is fucking me over</p>



<a name="188958695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958695">(Feb 24 2020 at 19:41)</a>:</h4>
<p>fantastic</p>



<a name="188958834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958834">(Feb 24 2020 at 19:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188951829" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188951829">said</a>:</p>
<blockquote>
<p>similar to <code>RustIrDatabase</code></p>
</blockquote>
<p>if it helps, I think the interner would probably <em>be</em> the RustIrData in many cases -- or a wrapper around it</p>



<a name="188958866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958866">(Feb 24 2020 at 19:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188954278" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188954278">said</a>:</p>
<blockquote>
<p>and it requires that i add a lifetime param to Program</p>
</blockquote>
<p>I think this is probably going in the wrong direction</p>



<a name="188958942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188958942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188958942">(Feb 24 2020 at 19:44)</a>:</h4>
<p>let me check the PR now though, I was afk for a bit</p>



<a name="188959004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959004">(Feb 24 2020 at 19:44)</a>:</h4>
<p>awe fk this generates a lot more code than I thought</p>



<a name="188959011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959011">(Feb 24 2020 at 19:45)</a>:</h4>
<p>okay</p>



<a name="188959050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959050">(Feb 24 2020 at 19:45)</a>:</h4>
<p>i shall stop cargo culting and wait for guidance</p>



<a name="188959051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959051">(Feb 24 2020 at 19:45)</a>:</h4>
<p>:)</p>



<a name="188959880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959880">(Feb 24 2020 at 19:54)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> ok so the branch in your PR .. builds?</p>



<a name="188959887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959887">(Feb 24 2020 at 19:55)</a>:</h4>
<p>with <code>cargo check --all</code> at least</p>



<a name="188959898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959898">(Feb 24 2020 at 19:55)</a>:</h4>
<p>does it right now?</p>



<a name="188959912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959912">(Feb 24 2020 at 19:55)</a>:</h4>
<p>eyy cool</p>



<a name="188959914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959914">(Feb 24 2020 at 19:55)</a>:</h4>
<p>yea</p>



<a name="188959932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959932">(Feb 24 2020 at 19:55)</a>:</h4>
<p>is the question then "did I do it right"</p>



<a name="188959943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959943">(Feb 24 2020 at 19:55)</a>:</h4>
<p>thats mostly thanks to creative use of <code>unimplemented!()</code></p>



<a name="188959948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959948">(Feb 24 2020 at 19:55)</a>:</h4>
<p>or "egads this feels so messy in part X"</p>



<a name="188959952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188959952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188959952">(Feb 24 2020 at 19:55)</a>:</h4>
<p>ok :)</p>



<a name="188960009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960009">(Feb 24 2020 at 19:56)</a>:</h4>
<p>I see</p>



<a name="188960035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960035">(Feb 24 2020 at 19:56)</a>:</h4>
<p>I'm going to poke around a bit</p>



<a name="188960047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960047">(Feb 24 2020 at 19:56)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;k</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Env</span><span class="o">&lt;</span><span class="na">&#39;k</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">interner</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="nc">ChalkIr</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188960053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960053">(Feb 24 2020 at 19:56)</a>:</h4>
<p>probably a good place to start poking</p>



<a name="188960176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960176">(Feb 24 2020 at 19:58)</a>:</h4>
<p>I'm removing <code>GOal::interner</code></p>



<a name="188960178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960178">(Feb 24 2020 at 19:58)</a>:</h4>
<p>which seems wrong</p>



<a name="188960198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960198">(Feb 24 2020 at 19:58)</a>:</h4>
<p>ok</p>



<a name="188960218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960218">(Feb 24 2020 at 19:58)</a>:</h4>
<p>(side note, I do wonder if we should <code>trait RustIrDatabase: Interner</code>, but I'm going to leave it as is for now)</p>



<a name="188960390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960390">(Feb 24 2020 at 20:00)</a>:</h4>
<p>to explain why it seems wrong: Goals are a "data structure" that gets allocated in the interner, they don't own the interner</p>



<a name="188960413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960413">(Feb 24 2020 at 20:01)</a>:</h4>
<p>same is probably true of <code>Env&lt;'k&gt;</code> =)</p>



<a name="188960446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960446">(Feb 24 2020 at 20:01)</a>:</h4>
<p>oh, no, that's just used during lowering</p>



<a name="188960450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960450">(Feb 24 2020 at 20:01)</a>:</h4>
<p>i see i see</p>



<a name="188960478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960478">(Feb 24 2020 at 20:01)</a>:</h4>
<p>I guess that for now we can change <code>ChalkIr</code> to just <code>struct ChalkIr;</code></p>



<a name="188960502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188960502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188960502">(Feb 24 2020 at 20:02)</a>:</h4>
<p>and return this global constant</p>



<a name="188961165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961165">(Feb 24 2020 at 20:09)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I'm debating the best way to give feedback here :)</p>



<a name="188961176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961176">(Feb 24 2020 at 20:09)</a>:</h4>
<p>I guess I can leave comments on the PR</p>



<a name="188961178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961178">(Feb 24 2020 at 20:09)</a>:</h4>
<p>okay</p>



<a name="188961190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961190">(Feb 24 2020 at 20:09)</a>:</h4>
<p>im fiddling with the interner around goal</p>



<a name="188961286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961286">(Feb 24 2020 at 20:10)</a>:</h4>
<p>actually</p>



<a name="188961298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961298">(Feb 24 2020 at 20:10)</a>:</h4>
<p>what I think I will do is push some commits with <code>// NDM</code> containing a few notes</p>



<a name="188961390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188961390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188961390">(Feb 24 2020 at 20:12)</a>:</h4>
<p>okay</p>



<a name="188962069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962069">(Feb 24 2020 at 20:20)</a>:</h4>
<p>so I see the changes you made, now we have interners all throughout chalk integration it seems</p>



<a name="188962071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962071">(Feb 24 2020 at 20:20)</a>:</h4>
<p>OK, I just pushed a commit with a bunch of comments</p>



<a name="188962086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962086">(Feb 24 2020 at 20:21)</a>:</h4>
<p>one for each <code>unimplemented!</code></p>



<a name="188962087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962087">(Feb 24 2020 at 20:21)</a>:</h4>
<p>okay</p>



<a name="188962091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962091">(Feb 24 2020 at 20:21)</a>:</h4>
<p>looking for that</p>



<a name="188962102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962102">(Feb 24 2020 at 20:21)</a>:</h4>
<p>the basic pattern is this</p>



<a name="188962107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962107">(Feb 24 2020 at 20:21)</a>:</h4>
<p>there are structs that correspond to "some operation"</p>



<a name="188962120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962120">(Feb 24 2020 at 20:21)</a>:</h4>
<p>e.g., <code>Canonicalization</code> and <code>Truncation</code></p>



<a name="188962128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962128">(Feb 24 2020 at 20:21)</a>:</h4>
<p>those structs should store a <code>&amp;I</code> and implement <code>Folder</code></p>



<a name="188962141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962141">(Feb 24 2020 at 20:21)</a>:</h4>
<p>but they will often need to get it from an additional argument on the method that constructs the struct</p>



<a name="188962145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962145">(Feb 24 2020 at 20:21)</a>:</h4>
<p>(which will propagate, but hopefully not too far...)</p>



<a name="188962191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962191">(Feb 24 2020 at 20:22)</a>:</h4>
<p>there are a few other cases, like <code>Substitution&lt;I&gt;</code>, where we were trying to get away with just having one struct that represents part of the IR <em>and</em> implements <code>TypeFolder</code>. That doesn't work I guess.</p>



<a name="188962201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962201">(Feb 24 2020 at 20:22)</a>:</h4>
<p>The alternative would be to modify the <code>fold_with</code> methods to thread the <code>interner</code> down</p>



<a name="188962210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962210">(Feb 24 2020 at 20:22)</a>:</h4>
<p>instead of having a <code>fn interner(&amp;self)</code> method in <code>TypeFolder</code></p>



<a name="188962221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962221">(Feb 24 2020 at 20:22)</a>:</h4>
<p>but I <em>think</em> it's probably better this way</p>



<a name="188962434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962434">(Feb 24 2020 at 20:25)</a>:</h4>
<p>okay</p>



<a name="188962441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962441">(Feb 24 2020 at 20:25)</a>:</h4>
<p>so when you say which will propogate</p>



<a name="188962500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962500">(Feb 24 2020 at 20:26)</a>:</h4>
<p>you mean just add interner args onto fns that call fns like <code>shift_in</code> until you get to some place where you can access a concrete interner</p>



<a name="188962512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962512">(Feb 24 2020 at 20:26)</a>:</h4>
<p>either as an arg thats already passed or from the db or something</p>



<a name="188962551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962551">(Feb 24 2020 at 20:27)</a>:</h4>
<p>or another folder that has its own self.interner() method</p>



<a name="188962675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962675">(Feb 24 2020 at 20:28)</a>:</h4>
<p>yeah</p>



<a name="188962681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962681">(Feb 24 2020 at 20:28)</a>:</h4>
<p>basically</p>



<a name="188962683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962683">(Feb 24 2020 at 20:28)</a>:</h4>
<p>I would do them one at a time :)</p>



<a name="188962718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962718">(Feb 24 2020 at 20:29)</a>:</h4>
<p>I've not read in depth apart from searching for <code>unimplemented!</code>, though my spot checks all seemed to look roughly like what I expect</p>



<a name="188962839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962839">(Feb 24 2020 at 20:30)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="p">...</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">needs_shift</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">clone</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="n">ty</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">ty</span><span class="p">.</span><span class="n">shifted_in</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188962853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188962853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188962853">(Feb 24 2020 at 20:30)</a>:</h4>
<p>looks like I need to add an arg here</p>



<a name="188963083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963083">(Feb 24 2020 at 20:33)</a>:</h4>
<p>another case where a visitor would be nice, <span class="user-mention" data-user-id="232957">@Jack Huey</span> =)</p>



<a name="188963086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963086">(Feb 24 2020 at 20:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188962853" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/188962853">said</a>:</p>
<blockquote>
<p>looks like I need to add an arg here</p>
</blockquote>
<p>yes</p>



<a name="188963087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963087">(Feb 24 2020 at 20:33)</a>:</h4>
<p>though that's quite annoying</p>



<a name="188963103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963103">(Feb 24 2020 at 20:33)</a>:</h4>
<p>I mean mostly because we shouldn't need to do any interning here</p>



<a name="188963121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963121">(Feb 24 2020 at 20:33)</a>:</h4>
<p>I don't think it's called in a ton of places..?</p>



<a name="188963384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963384">(Feb 24 2020 at 20:36)</a>:</h4>
<p>I'm still working on the first unimplemented call</p>



<a name="188963385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963385">(Feb 24 2020 at 20:36)</a>:</h4>
<p>lol</p>



<a name="188963386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963386">(Feb 24 2020 at 20:36)</a>:</h4>
<p>its spreading a lot</p>



<a name="188963391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963391">(Feb 24 2020 at 20:36)</a>:</h4>
<p>its not bad</p>



<a name="188963395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963395">(Feb 24 2020 at 20:36)</a>:</h4>
<p>like not deeply</p>



<a name="188963417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963417">(Feb 24 2020 at 20:36)</a>:</h4>
<p>but it seems like this touches a lot of places, thankfully most already have interners threaded to them</p>



<a name="188963437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963437">(Feb 24 2020 at 20:37)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Zipper</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">AnswerSubstitutor</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">zip_tys</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">answer</span>: <span class="kp">&amp;</span><span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">pending</span>: <span class="kp">&amp;</span><span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">pending</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">table</span><span class="p">.</span><span class="n">normalize_shallow</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">interner</span><span class="p">,</span><span class="w"> </span><span class="n">pending</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">return</span><span class="w"> </span><span class="n">Zip</span>::<span class="n">zip_with</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">answer</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">pending</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188963441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963441">(Feb 24 2020 at 20:37)</a>:</h4>
<p>this one doesn't though</p>



<a name="188963551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963551">(Feb 24 2020 at 20:38)</a>:</h4>
<p>also this one is a conflicting mut and shared borrow</p>



<a name="188963556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188963556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188963556">(Feb 24 2020 at 20:38)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">fold_ty</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>: <span class="kp">&amp;</span><span class="nc">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">normalized_ty</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">infer</span><span class="p">.</span><span class="n">normalize_shallow</span><span class="p">(</span><span class="bp">self</span><span class="p">.</span><span class="n">interner</span><span class="p">(),</span><span class="w"> </span><span class="n">ty</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">return</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">fold_ty</span><span class="p">(</span><span class="o">&amp;</span><span class="n">normalized_ty</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="188968725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188968725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188968725">(Feb 24 2020 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> hmm</p>



<a name="188968742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188968742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188968742">(Feb 24 2020 at 21:36)</a>:</h4>
<p>probably <code>self.interner</code> would work fine there?</p>



<a name="188968752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188968752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188968752">(Feb 24 2020 at 21:36)</a>:</h4>
<p>i.e., the problem is using the <em>method</em> vs the field</p>



<a name="188976504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188976504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188976504">(Feb 24 2020 at 23:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> im a little confused by how to handle the <code>apply</code> method for Substitution</p>



<a name="188976562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188976562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188976562">(Feb 24 2020 at 23:14)</a>:</h4>
<p>I added a SubstFolder type and moved the Folder impl to that type instead of Substitution</p>



<a name="188976571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188976571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188976571">(Feb 24 2020 at 23:14)</a>:</h4>
<p>and gave it a reference to the Substitution and Interner that it needs to operate</p>



<a name="188976579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/188976579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#188976579">(Feb 24 2020 at 23:14)</a>:</h4>
<p>but I'm not sure how to use that from <code>apply</code> or how to use apply throughout the rest of the code</p>



<a name="189048218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189048218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189048218">(Feb 25 2020 at 18:45)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> well in some parts of the code that have a <code>s: Substitution</code> you will find something like <code>ty.fold_with(&amp;s, 0)</code></p>



<a name="189048234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189048234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189048234">(Feb 25 2020 at 18:45)</a>:</h4>
<p>that call can be changed to <code>s.apply(ty)</code></p>



<a name="189049060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189049060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189049060">(Feb 25 2020 at 18:55)</a>:</h4>
<p>cool</p>



<a name="189451162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451162">(Mar 01 2020 at 22:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="232957">@Jack Huey</span> pushed a bunch of changes</p>



<a name="189451165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451165">(Mar 01 2020 at 22:42)</a>:</h4>
<p>getting close</p>



<a name="189451172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451172">(Mar 01 2020 at 22:43)</a>:</h4>
<p>i've left all the things I still dont know how to handle <code>unimplemented!()</code> its mostly target_interners</p>



<a name="189451180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451180">(Mar 01 2020 at 22:43)</a>:</h4>
<p>theres a few places where I am pretty sure it will just need to added as an arg to the struct that Folder is implemented on</p>



<a name="189451188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451188">(Mar 01 2020 at 22:43)</a>:</h4>
<p>but I'll wait for general feedback before trying to guess at things</p>



<a name="189451235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451235">(Mar 01 2020 at 22:44)</a>:</h4>
<p>if someone is around ping me and I can switch to synchronous mode and request feedback on specific things I and how I expect it will need to be handled</p>



<a name="189451990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189451990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189451990">(Mar 01 2020 at 23:06)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I am around-ish</p>



<a name="189452000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452000">(Mar 01 2020 at 23:07)</a>:</h4>
<p>Woo</p>



<a name="189452001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452001">(Mar 01 2020 at 23:07)</a>:</h4>
<p>Question time it is</p>



<a name="189452097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452097">(Mar 01 2020 at 23:09)</a>:</h4>
<p>is it safe to add an interner member to</p>



<a name="189452098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452098">(Mar 01 2020 at 23:09)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Folder</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">OccursCheck</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="189452100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452100">(Mar 01 2020 at 23:09)</a>:</h4>
<p>occurscheck</p>



<a name="189452101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452101">(Mar 01 2020 at 23:09)</a>:</h4>
<p>for its folder impl</p>



<a name="189452144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452144">(Mar 01 2020 at 23:10)</a>:</h4>
<p>Let me check</p>



<a name="189452148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452148">(Mar 01 2020 at 23:10)</a>:</h4>
<p>I think yes</p>



<a name="189452151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452151">(Mar 01 2020 at 23:10)</a>:</h4>
<p>same thing for</p>



<a name="189452154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452154">(Mar 01 2020 at 23:10)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">UMapToCanonical</span><span class="o">&lt;</span><span class="na">&#39;q</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">universes</span>: <span class="kp">&amp;</span><span class="na">&#39;q</span><span class="w"> </span><span class="n">UniverseMap</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189452160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452160">(Mar 01 2020 at 23:10)</a>:</h4>
<p>Yeah, probably</p>



<a name="189452164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452164">(Mar 01 2020 at 23:11)</a>:</h4>
<p>and UMapFromCanonical</p>



<a name="189452166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452166">(Mar 01 2020 at 23:11)</a>:</h4>
<p>okay</p>



<a name="189452173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452173">(Mar 01 2020 at 23:11)</a>:</h4>
<p>I think for most of the <code>Folder</code>s adding a <code>&amp;Interner</code> field is correct</p>



<a name="189452225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452225">(Mar 01 2020 at 23:12)</a>:</h4>
<p>okay should I add an interner field to the universe</p>



<a name="189452229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452229">(Mar 01 2020 at 23:12)</a>:</h4>
<p>or thread it through the args on methods it uses that need it</p>



<a name="189452234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452234">(Mar 01 2020 at 23:12)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="p">(</span><span class="k">crate</span><span class="p">)</span><span class="w"> </span><span class="k">struct</span> <span class="nc">UniverseMap</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="sd">/// A reverse map -- for each universe Ux that appears in</span>
<span class="w">    </span><span class="sd">/// `quantified`, the corresponding universe in the original was</span>
<span class="w">    </span><span class="sd">/// `universes[x]`.</span>
<span class="w">    </span><span class="n">universes</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">UniverseIndex</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189452251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452251">(Mar 01 2020 at 23:13)</a>:</h4>
<p>I think args</p>



<a name="189452255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452255">(Mar 01 2020 at 23:13)</a>:</h4>
<p>okay</p>



<a name="189452319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452319">(Mar 01 2020 at 23:15)</a>:</h4>
<p>maybe the most general guidance is: if there is a reference in the struct, also add an interner reference, otherwise, pass it as an arg</p>



<a name="189452660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452660">(Mar 01 2020 at 23:24)</a>:</h4>
<p>okay so now we're down to a fun one</p>



<a name="189452665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452665">(Mar 01 2020 at 23:24)</a>:</h4>
<p>figuring out how to appease borrowchk</p>



<a name="189452675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452675">(Mar 01 2020 at 23:25)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">impl_where_clauses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">impl_datum</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">binders</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map_ref</span><span class="p">(</span><span class="o">|</span><span class="n">b</span><span class="o">|</span><span class="w"> </span><span class="o">&amp;</span><span class="n">b</span><span class="p">.</span><span class="n">where_clauses</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">into_iter</span><span class="p">()</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">wc</span><span class="o">|</span><span class="w"> </span><span class="n">wc</span><span class="p">.</span><span class="n">substitute</span><span class="p">(</span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"> </span><span class="cm">/* fails borrowck builder.db.interner() */</span><span class="p">,</span><span class="w"> </span><span class="n">impl_params</span><span class="p">));</span><span class="w"></span>

<span class="w">            </span><span class="c1">// 2. any where-clauses from the `type` declaration in the trait: the</span>
<span class="w">            </span><span class="c1">//    parameters must be substituted with those of the impl</span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">assoc_ty_where_clauses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">associated_ty</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">binders</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map_ref</span><span class="p">(</span><span class="o">|</span><span class="n">b</span><span class="o">|</span><span class="w"> </span><span class="o">&amp;</span><span class="n">b</span><span class="p">.</span><span class="n">where_clauses</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">into_iter</span><span class="p">()</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">wc</span><span class="o">|</span><span class="w"> </span><span class="n">wc</span><span class="p">.</span><span class="n">substitute</span><span class="p">(</span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"> </span><span class="cm">/* fails borrowck builder.db.interner() */</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">projection</span><span class="p">.</span><span class="n">substitution</span><span class="p">));</span><span class="w"></span>

<span class="w">            </span><span class="c1">// Create the final program clause:</span>
<span class="w">            </span><span class="c1">//</span>
<span class="w">            </span><span class="c1">// ```notrust</span>
<span class="w">            </span><span class="c1">// -- Rule Normalize-From-Impl</span>
<span class="w">            </span><span class="c1">// forall&lt;&#39;a, T&gt; {</span>
<span class="w">            </span><span class="c1">//     Normalize(&lt;Vec&lt;T&gt; as Iterable&gt;::IntoIter&lt;&#39;a&gt; -&gt; Iter&lt;&#39;a, T&gt;&gt;) :-</span>
<span class="w">            </span><span class="c1">//         Implemented(T: Clone),  // (1)</span>
<span class="w">            </span><span class="c1">//         Implemented(Iter&lt;&#39;a, T&gt;: &#39;a).   // (2)</span>
<span class="w">            </span><span class="c1">// }</span>
<span class="w">            </span><span class="c1">// ```</span>
<span class="w">            </span><span class="n">builder</span><span class="p">.</span><span class="n">push_clause</span><span class="p">(</span><span class="w"></span>
<span class="w">                </span><span class="n">Normalize</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">alias</span>: <span class="nc">projection</span><span class="p">.</span><span class="n">clone</span><span class="p">(),</span><span class="w"></span>
<span class="w">                    </span><span class="n">ty</span>: <span class="nc">assoc_ty_value</span><span class="p">.</span><span class="n">ty</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="p">},</span><span class="w"></span>
<span class="w">                </span><span class="n">impl_where_clauses</span><span class="p">.</span><span class="n">chain</span><span class="p">(</span><span class="n">assoc_ty_where_clauses</span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="p">);</span><span class="w"></span>
</pre></div>



<a name="189452727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452727">(Mar 01 2020 at 23:26)</a>:</h4>
<p>so it wants to borrow builder as mut to do the push_clause</p>



<a name="189452732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452732">(Mar 01 2020 at 23:26)</a>:</h4>
<p>but retrieving the interner from the db (which is a trait object) borrows the entire thing apparently</p>



<a name="189452735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452735">(Mar 01 2020 at 23:26)</a>:</h4>
<p>ooh wait no its becasue of the closure</p>



<a name="189452738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452738">(Mar 01 2020 at 23:26)</a>:</h4>
<p>i can fix this actually</p>



<a name="189452746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452746">(Mar 01 2020 at 23:27)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">db</span><span class="p">.</span><span class="n">interner</span><span class="p">();</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">impl_where_clauses</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">impl_datum</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">binders</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map_ref</span><span class="p">(</span><span class="o">|</span><span class="n">b</span><span class="o">|</span><span class="w"> </span><span class="o">&amp;</span><span class="n">b</span><span class="p">.</span><span class="n">where_clauses</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">into_iter</span><span class="p">()</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">wc</span><span class="o">|</span><span class="w"> </span><span class="n">wc</span><span class="p">.</span><span class="n">substitute</span><span class="p">(</span><span class="n">interner</span><span class="p">,</span><span class="w"> </span><span class="n">impl_params</span><span class="p">));</span><span class="w"></span>
</pre></div>



<a name="189452747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452747">(Mar 01 2020 at 23:27)</a>:</h4>
<p>ez</p>



<a name="189452751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452751">(Mar 01 2020 at 23:27)</a>:</h4>
<p>okay!</p>



<a name="189452753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452753">(Mar 01 2020 at 23:27)</a>:</h4>
<p>we're almost done!</p>



<a name="189452791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452791">(Mar 01 2020 at 23:28)</a>:</h4>
<p>everything that is left is the exact same thing</p>



<a name="189452794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452794">(Mar 01 2020 at 23:28)</a>:</h4>
<p>all the implementors of Folder currently have</p>



<a name="189452795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452795">(Mar 01 2020 at 23:28)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">target_interner</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="nc">I</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189452802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452802">(Mar 01 2020 at 23:28)</a>:</h4>
<p>do I just yolo them all as <code>self.interner()</code> and type checking handle it when its wrong?</p>



<a name="189452806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452806">(Mar 01 2020 at 23:28)</a>:</h4>
<p>also</p>



<a name="189452807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452807">(Mar 01 2020 at 23:28)</a>:</h4>
<p>actually</p>



<a name="189452810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452810">(Mar 01 2020 at 23:28)</a>:</h4>
<p>ooh yea this is probably easy</p>



<a name="189452813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452813">(Mar 01 2020 at 23:29)</a>:</h4>
<p>most of these return &amp;I on both</p>



<a name="189452827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452827">(Mar 01 2020 at 23:29)</a>:</h4>
<p>yeah, do we current have any <code>Folder</code>s where <code>Interner</code> != <code>TargetInterner</code></p>



<a name="189452873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452873">(Mar 01 2020 at 23:30)</a>:</h4>
<p>ooh boy here's the fun part</p>



<a name="189452875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452875">(Mar 01 2020 at 23:30)</a>:</h4>
<p>lets see how cargo test works</p>



<a name="189452883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452883">(Mar 01 2020 at 23:30)</a>:</h4>
<p>100% passed</p>



<a name="189452884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452884">(Mar 01 2020 at 23:30)</a>:</h4>
<p>okay in theory this PR is done minus review</p>



<a name="189452894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452894">(Mar 01 2020 at 23:31)</a>:</h4>
<p>Nice</p>



<a name="189452895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452895">(Mar 01 2020 at 23:31)</a>:</h4>
<p>okay</p>



<a name="189452901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452901">(Mar 01 2020 at 23:31)</a>:</h4>
<p>I won't be able to review tonight</p>



<a name="189452903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452903">(Mar 01 2020 at 23:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/330" target="_blank" title="https://github.com/rust-lang/chalk/pull/330">https://github.com/rust-lang/chalk/pull/330</a></p>



<a name="189452904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452904">(Mar 01 2020 at 23:31)</a>:</h4>
<p>ack</p>



<a name="189452906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452906">(Mar 01 2020 at 23:31)</a>:</h4>
<p>And definitely would want to defer to <span class="user-mention" data-user-id="116009">@nikomatsakis</span> regardless</p>



<a name="189452908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452908">(Mar 01 2020 at 23:31)</a>:</h4>
<p>im in no rush, but its there and ready for whoever whenever they're ready to review</p>



<a name="189452909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452909">(Mar 01 2020 at 23:31)</a>:</h4>
<p>:thumbsup:</p>



<a name="189452918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452918">(Mar 01 2020 at 23:32)</a>:</h4>
<p>im just excited it works!</p>



<a name="189452948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452948">(Mar 01 2020 at 23:32)</a>:</h4>
<p>not surprising but yea</p>



<a name="189452951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452951">(Mar 01 2020 at 23:32)</a>:</h4>
<p>god i fucking love rust</p>



<a name="189452953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452953">(Mar 01 2020 at 23:32)</a>:</h4>
<p>haha</p>



<a name="189452956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452956">(Mar 01 2020 at 23:32)</a>:</h4>
<p>this is actually a key piece of the rustc integration, it turns out</p>



<a name="189452958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452958">(Mar 01 2020 at 23:32)</a>:</h4>
<p>change almost 700 lines and break 0 tests once u get it compiling</p>



<a name="189452959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452959">(Mar 01 2020 at 23:32)</a>:</h4>
<p>welp</p>



<a name="189452960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452960">(Mar 01 2020 at 23:32)</a>:</h4>
<p>i hope I didnt delay things too much</p>



<a name="189452961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452961">(Mar 01 2020 at 23:32)</a>:</h4>
<p>:S</p>



<a name="189452968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452968">(Mar 01 2020 at 23:33)</a>:</h4>
<p>i got stuck in a mini rut this week, I have a bad habit of putting things down and then having trouble starting again</p>



<a name="189452973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189452973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189452973">(Mar 01 2020 at 23:33)</a>:</h4>
<p>been very obsessed with error handling stuff which took up a bunch of my free time</p>



<a name="189453021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453021">(Mar 01 2020 at 23:34)</a>:</h4>
<p>no, didn't delay anything. I got around this with some hacky <code>unsafe</code> lifetime transmutation, but that's not okay to stay at merge though</p>



<a name="189453026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453026">(Mar 01 2020 at 23:35)</a>:</h4>
<p>thanks for all the work :)</p>



<a name="189453073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453073">(Mar 01 2020 at 23:36)</a>:</h4>
<p>my pleasure :D</p>



<a name="189453082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453082">(Mar 01 2020 at 23:37)</a>:</h4>
<p>let me know if you want another something to work on ;)</p>



<a name="189453152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453152">(Mar 01 2020 at 23:39)</a>:</h4>
<p>I think there was something that niko was looking for help on that i offered to help with during the last meeting</p>



<a name="189453200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453200">(Mar 01 2020 at 23:40)</a>:</h4>
<p>possibly</p>



<a name="189453201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453201">(Mar 01 2020 at 23:40)</a>:</h4>
<p>some sort of "Predicate stuff"</p>



<a name="189453204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453204">(Mar 01 2020 at 23:40)</a>:</h4>
<p>maybe the binders</p>



<a name="189453205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453205">(Mar 01 2020 at 23:40)</a>:</h4>
<p>ohhh right</p>



<a name="189453211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453211">(Mar 01 2020 at 23:41)</a>:</h4>
<p>if you want to point me at that I can start investigating it</p>



<a name="189453223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453223">(Mar 01 2020 at 23:41)</a>:</h4>
<p>looks like refactoring it in rustc</p>



<a name="189453224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453224">(Mar 01 2020 at 23:41)</a>:</h4>
<p>I don't know much about it</p>



<a name="189453227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453227">(Mar 01 2020 at 23:41)</a>:</h4>
<p>or, really anything about it</p>



<a name="189453228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189453228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189453228">(Mar 01 2020 at 23:41)</a>:</h4>
<p>so ill need to look at how Predicate works in rustc and in chalk</p>



<a name="189507451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189507451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189507451">(Mar 02 2020 at 16:23)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> this is amazing</p>



<a name="189507455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189507455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189507455">(Mar 02 2020 at 16:23)</a>:</h4>
<p>I'm going to review now</p>



<a name="189507459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189507459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189507459">(Mar 02 2020 at 16:23)</a>:</h4>
<p>happy to help with guiding the <code>Predicate</code> thing</p>



<a name="189507476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189507476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189507476">(Mar 02 2020 at 16:23)</a>:</h4>
<p><span aria-label="blush" class="emoji emoji-1f60a" role="img" title="blush">:blush:</span></p>



<a name="189508112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189508112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189508112">(Mar 02 2020 at 16:29)</a>:</h4>
<p>Hmm, <code>cargo test --all</code> doesn't build though</p>



<a name="189508261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189508261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189508261">(Mar 02 2020 at 16:30)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> looks like a bunch of tests need updating, though I think they can be changed to just add <code>ChalkIr</code> as the interner</p>



<a name="189509086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189509086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189509086">(Mar 02 2020 at 16:39)</a>:</h4>
<p>Nope, that's good to go</p>



<a name="189509122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189509122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189509122">(Mar 02 2020 at 16:39)</a>:</h4>
<p>(<span class="user-mention" data-user-id="232957">@Jack Huey</span> did you mean that comment for <a class="stream-topic" data-stream-id="144729" href="/#narrow/stream/144729-wg-traits/topic/removing.20dependency.20on.20intern">#wg-traits &gt; removing dependency on intern</a>?)</p>



<a name="189509132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189509132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189509132">(Mar 02 2020 at 16:39)</a>:</h4>
<p>oops yes</p>



<a name="189511328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189511328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189511328">(Mar 02 2020 at 17:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> which tests do I need to add chalkir to?</p>



<a name="189511444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189511444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189511444">(Mar 02 2020 at 17:02)</a>:</h4>
<p>it seems like making it so the db just returns a &amp;ChalkIr makes it so all the tests pass without modification</p>



<a name="189511459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189511459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189511459">(Mar 02 2020 at 17:02)</a>:</h4>
<p>so I'm unsure what changes are needed</p>



<a name="189511475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189511475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189511475">(Mar 02 2020 at 17:02)</a>:</h4>
<p>i did catch a few accidentally leftover lint allows tho</p>



<a name="189511977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189511977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189511977">(Mar 02 2020 at 17:08)</a>:</h4>
<p>Will also need to rebase :)</p>



<a name="189514756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189514756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189514756">(Mar 02 2020 at 17:32)</a>:</h4>
<p>Actually, since <a href="https://github.com/rust-lang/chalk/pull/338" target="_blank" title="https://github.com/rust-lang/chalk/pull/338">https://github.com/rust-lang/chalk/pull/338</a> is merged, a few of your logic changes should be nicer (don't have to pass <code>context</code>)</p>



<a name="189522013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522013">(Mar 02 2020 at 18:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189511328" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189511328">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> which tests do I need to add chalkir to?</p>
</blockquote>
<p>just run <code>cargo test --all</code></p>



<a name="189522019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522019">(Mar 02 2020 at 18:44)</a>:</h4>
<p>and you'll see...</p>



<a name="189522085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522085">(Mar 02 2020 at 18:45)</a>:</h4>
<p>oh, lol</p>



<a name="189522089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522089">(Mar 02 2020 at 18:45)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> well, let me see</p>



<a name="189522100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522100">(Mar 02 2020 at 18:45)</a>:</h4>
<p>maybe my git fetch was out of date</p>



<a name="189522113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522113">(Mar 02 2020 at 18:45)</a>:</h4>
<p>nope</p>



<a name="189522127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189522127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189522127">(Mar 02 2020 at 18:45)</a>:</h4>
<div class="codehilite"><pre><span></span>cargo test --all
   Compiling chalk-macros v0.1.1 (/home/nmatsakis/versioned/chalk-1/chalk-macros)
   Compiling chalk-engine v0.9.0 (/home/nmatsakis/versioned/chalk-1/chalk-engine)
   Compiling chalk-ir v0.1.0 (/home/nmatsakis/versioned/chalk-1/chalk-ir)
   Compiling chalk-rust-ir v0.1.0 (/home/nmatsakis/versioned/chalk-1/chalk-rust-ir)
   Compiling chalk-solve v0.1.0 (/home/nmatsakis/versioned/chalk-1/chalk-solve)
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --&gt; chalk-solve/src/infer/test.rs:11:36
   |
11 |     let a = table.new_variable(U0).to_ty();
   |                                    ^^^^^ expected 1 parameter
   |
  ::: chalk-solve/src/infer/var.rs:57:5
   |
57 |     pub(crate) fn to_ty(self, interner: &amp;I) -&gt; Ty&lt;I&gt; {
   |     ------------------------------------------------ defined here

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --&gt; chalk-solve/src/infer/test.rs:12:36
   |
12 |     let b = table.new_variable(U0).to_ty();
   |                                    ^^^^^ expected 1 parameter
   |
  ::: chalk-solve/src/infer/var.rs:57:5
   |
57 |     pub(crate) fn to_ty(self, interner: &amp;I) -&gt; Ty&lt;I&gt; {
   |     ------------------------------------------------ defined here
</pre></div>



<a name="189523916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189523916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189523916">(Mar 02 2020 at 19:01)</a>:</h4>
<p>yea no its super broken</p>



<a name="189523921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189523921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189523921">(Mar 02 2020 at 19:01)</a>:</h4>
<p>im currently fighting the <code>ty!</code> macro</p>



<a name="189523962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189523962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189523962">(Mar 02 2020 at 19:02)</a>:</h4>
<p>oh... hmm</p>



<a name="189523971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189523971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189523971">(Mar 02 2020 at 19:02)</a>:</h4>
<p>gonna have to take a break rq tho for a paid intermission</p>



<a name="189523992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189523992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189523992">(Mar 02 2020 at 19:02)</a>:</h4>
<p>and by that i mean work</p>



<a name="189524002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524002">(Mar 02 2020 at 19:02)</a>:</h4>
<p>the hacky fix would be to have <code>ty!</code> and friends just reference some variable <code>interner</code></p>



<a name="189524015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524015">(Mar 02 2020 at 19:02)</a>:</h4>
<p>and depend on having the surrounding context define that</p>



<a name="189524025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524025">(Mar 02 2020 at 19:02)</a>:</h4>
<p>or.. well</p>



<a name="189524029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524029">(Mar 02 2020 at 19:02)</a>:</h4>
<p>they can just hardcode <code>ChalkIr</code></p>



<a name="189524033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524033">(Mar 02 2020 at 19:02)</a>:</h4>
<p>that's fine</p>



<a name="189524038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524038">(Mar 02 2020 at 19:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189523992" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189523992">said</a>:</p>
<blockquote>
<p>and by that i mean work</p>
</blockquote>
<p>by all means :)</p>



<a name="189524089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524089">(Mar 02 2020 at 19:03)</a>:</h4>
<p>i will just hack it to use &amp;ChalkIr for now I think</p>



<a name="189524115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524115">(Mar 02 2020 at 19:03)</a>:</h4>
<p>i was trying to add a <code>$interner:ident,</code> to each part of the macro</p>



<a name="189524127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524127">(Mar 02 2020 at 19:03)</a>:</h4>
<p>but it was getting hard to debug when all you get told is "no rule to handle token"</p>



<a name="189524266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524266">(Mar 02 2020 at 19:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189524115" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189524115">said</a>:</p>
<blockquote>
<p>i was trying to add a <code>$interner:ident,</code> to each part of the macro</p>
</blockquote>
<p>not worth it, yeah</p>



<a name="189524271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189524271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189524271">(Mar 02 2020 at 19:04)</a>:</h4>
<p>besides it'll make the macro's annoying to use</p>



<a name="189525050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189525050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189525050">(Mar 02 2020 at 19:13)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay well when i didnt fk with the macro api the changes were easy</p>



<a name="189525060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189525060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189525060">(Mar 02 2020 at 19:13)</a>:</h4>
<p>so <code>cargo test --all</code> should now compile and pass</p>



<a name="189526482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189526482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189526482">(Mar 02 2020 at 19:25)</a>:</h4>
<p>Yeah, for tests, just hardcode &amp;ChalkIr since that's what it's for :)</p>



<a name="189526624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189526624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189526624">(Mar 02 2020 at 19:26)</a>:</h4>
<p>I was just worried that ChalkIr would someday get members</p>



<a name="189526914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189526914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189526914">(Mar 02 2020 at 19:29)</a>:</h4>
<p><code>ChalkIr</code> is essentially only for testing and <code>chalk-integration</code></p>



<a name="189526940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189526940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189526940">(Mar 02 2020 at 19:29)</a>:</h4>
<p>I suppose if it did ever get members, we could deal with it then :)</p>



<a name="189527021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189527021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189527021">(Mar 02 2020 at 19:30)</a>:</h4>
<p>sounds good</p>



<a name="189531755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189531755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189531755">(Mar 02 2020 at 20:16)</a>:</h4>
<p>yep, I don't expect <code>ChalkIr</code> to ever change and get members -- I could imagine maybe renaming it to <code>TestIr</code>, but it's basically there to be the "simple thing we use for testing"</p>



<a name="189531781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189531781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189531781">(Mar 02 2020 at 20:17)</a>:</h4>
<p>man, this is an exciting day</p>



<a name="189531885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189531885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189531885">(Mar 02 2020 at 20:18)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> I might merge <span class="user-mention" data-user-id="220273">@Jane Lusby</span>'s branch first, since I expect it'll conflict with yours, but it feels like hers would be more painful to rebase</p>



<a name="189531983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189531983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189531983">(Mar 02 2020 at 20:19)</a>:</h4>
<p>Agreed, because Jane's branch has more straightforward changes</p>



<a name="189532062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189532062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189532062">(Mar 02 2020 at 20:20)</a>:</h4>
<p>hype</p>



<a name="189532161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189532161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189532161">(Mar 02 2020 at 20:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189531781" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189531781">said</a>:</p>
<blockquote>
<p>man, this is an exciting day</p>
</blockquote>
<p>Yes it is</p>



<a name="189537459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189537459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189537459">(Mar 02 2020 at 21:13)</a>:</h4>
<p>That's 4 Chalk PRs merged today! Wow</p>



<a name="189539007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539007">(Mar 02 2020 at 21:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Rebased. You were right, rebasing was a breeze <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="189539254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539254">(Mar 02 2020 at 21:31)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I hate to say it, but there's still more work to do on this refactoring...</p>



<a name="189539262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539262">(Mar 02 2020 at 21:31)</a>:</h4>
<p>I'm going to open some follow-up issues</p>



<a name="189539268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539268">(Mar 02 2020 at 21:31)</a>:</h4>
<p>they ought to be much smaller though</p>



<a name="189539273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539273">(Mar 02 2020 at 21:31)</a>:</h4>
<p>we could maybe find others :)</p>



<a name="189539284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539284">(Mar 02 2020 at 21:31)</a>:</h4>
<p>first issue: <a href="https://github.com/rust-lang/chalk/issues/339" target="_blank" title="https://github.com/rust-lang/chalk/issues/339">https://github.com/rust-lang/chalk/issues/339</a></p>



<a name="189539461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539461">(Mar 02 2020 at 21:33)</a>:</h4>
<p>ez</p>



<a name="189539463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539463">(Mar 02 2020 at 21:33)</a>:</h4>
<p>i got this</p>



<a name="189539539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539539">(Mar 02 2020 at 21:34)</a>:</h4>
<p>there is also <a href="https://github.com/rust-lang/chalk/issues/340" target="_blank" title="https://github.com/rust-lang/chalk/issues/340">https://github.com/rust-lang/chalk/issues/340</a></p>



<a name="189539553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189539553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189539553">(Mar 02 2020 at 21:34)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> this one might be both easier and more important</p>



<a name="189540022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189540022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189540022">(Mar 02 2020 at 21:40)</a>:</h4>
<p>okay</p>



<a name="189540083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189540083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189540083">(Mar 02 2020 at 21:41)</a>:</h4>
<p>started vaguely working on the intern data if you want to comment on it here</p>



<a name="189540085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189540085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189540085">(Mar 02 2020 at 21:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/342/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/342/files">https://github.com/rust-lang/chalk/pull/342/files</a></p>



<a name="189540090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189540090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189540090">(Mar 02 2020 at 21:41)</a>:</h4>
<p>will switch to the easier/more important one</p>



<a name="189541371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541371">(Mar 02 2020 at 21:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> heres the intern_lifetime done <a href="https://github.com/rust-lang/chalk/pull/343" target="_blank" title="https://github.com/rust-lang/chalk/pull/343">https://github.com/rust-lang/chalk/pull/343</a></p>



<a name="189541385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541385">(Mar 02 2020 at 21:53)</a>:</h4>
<p>do you want them as separate PRs or all as one PR for issue 340?</p>



<a name="189541441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541441">(Mar 02 2020 at 21:54)</a>:</h4>
<p>either way</p>



<a name="189541471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541471">(Mar 02 2020 at 21:54)</a>:</h4>
<p>I figured adding <code>&amp;self</code> to intern methods would be relatively easy since you did all the plumbing already</p>



<a name="189541477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541477">(Mar 02 2020 at 21:54)</a>:</h4>
<p>k separate but im going to build off of the previous pr in each one</p>



<a name="189541762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541762">(Mar 02 2020 at 21:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> how should i add interners to this cast_to fn</p>



<a name="189541814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541814">(Mar 02 2020 at 21:57)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">CastTo</span><span class="o">&lt;</span><span class="n">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Lifetime</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">cast_to</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Parameter</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">Parameter</span>::<span class="n">new</span><span class="p">(</span><span class="n">ParameterKind</span>::<span class="n">Lifetime</span><span class="p">(</span><span class="bp">self</span><span class="p">))</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189541826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189541826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189541826">(Mar 02 2020 at 21:58)</a>:</h4>
<p>arg on trait?</p>



<a name="189542039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542039">(Mar 02 2020 at 21:59)</a>:</h4>
<p>hmm</p>



<a name="189542043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542043">(Mar 02 2020 at 21:59)</a>:</h4>
<p>I think add to <code>cast_to</code> method</p>



<a name="189542200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542200">(Mar 02 2020 at 22:00)</a>:</h4>
<p>okay so this adds an unconstrained type parameter that needs to be defined by the trait</p>



<a name="189542244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542244">(Mar 02 2020 at 22:01)</a>:</h4>
<p>do we want to require T: HasInterner and define the interner type as <code>interner: &amp;T::Interner</code></p>



<a name="189542281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542281">(Mar 02 2020 at 22:01)</a>:</h4>
<p>the alternative is to do <code>CastTo&lt;T, I: Interner&gt;</code> but that will duplicate the I parameter a ton in the various impls</p>



<a name="189542362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542362">(Mar 02 2020 at 22:02)</a>:</h4>
<p>I would probably change <code>cast_to</code> to</p>



<a name="189542379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542379">(Mar 02 2020 at 22:02)</a>:</h4>
<p>ah hmm</p>



<a name="189542395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542395">(Mar 02 2020 at 22:02)</a>:</h4>
<p>so you could do</p>



<a name="189542421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542421">(Mar 02 2020 at 22:02)</a>:</h4>
<p>I'm debating :)</p>



<a name="189542427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542427">(Mar 02 2020 at 22:02)</a>:</h4>
<p>lol</p>



<a name="189542431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542431">(Mar 02 2020 at 22:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189542244" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189542244">said</a>:</p>
<blockquote>
<p>do we want to require T: HasInterner and define the interner type as <code>interner: &amp;T::Interner</code></p>
</blockquote>
<p>yeah this is what I was going to suggest</p>



<a name="189542438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542438">(Mar 02 2020 at 22:02)</a>:</h4>
<p>but I guess it depends on the impls</p>



<a name="189542458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542458">(Mar 02 2020 at 22:03)</a>:</h4>
<p>ill go down this path and see if it hits any snags</p>



<a name="189542472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542472">(Mar 02 2020 at 22:03)</a>:</h4>
<p>because it seems like most of these types could easily implement HasInterner</p>



<a name="189542515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542515">(Mar 02 2020 at 22:03)</a>:</h4>
<p>yeah</p>



<a name="189542523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542523">(Mar 02 2020 at 22:03)</a>:</h4>
<p>from a quick skim it looks fine</p>



<a name="189542542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542542">(Mar 02 2020 at 22:04)</a>:</h4>
<p>actually nope</p>



<a name="189542590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542590">(Mar 02 2020 at 22:04)</a>:</h4>
<p>Canonical doesnt have an interner param</p>



<a name="189542617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542617">(Mar 02 2020 at 22:04)</a>:</h4>
<p>```impl&lt;T, U&gt; CastTo&lt;Canonical&lt;U&gt;&gt; for Canonical&lt;T&gt;<br>
where<br>
    T: CastTo&lt;U&gt;,</p>
<div class="codehilite"><pre><span></span>
</pre></div>



<a name="189542632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542632">(Mar 02 2020 at 22:04)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="w"> </span><span class="n">CastTo</span><span class="o">&lt;</span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">U</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">CastTo</span><span class="o">&lt;</span><span class="n">U</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
</pre></div>



<a name="189542662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542662">(Mar 02 2020 at 22:04)</a>:</h4>
<p>well</p>



<a name="189542665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542665">(Mar 02 2020 at 22:04)</a>:</h4>
<p>unfortunate :|</p>



<a name="189542672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542672">(Mar 02 2020 at 22:04)</a>:</h4>
<p>hold up :)</p>



<a name="189542717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542717">(Mar 02 2020 at 22:05)</a>:</h4>
<p>I think we could add a <code>impl&lt;T&gt; HasInterner for Canonical&lt;T&gt; where T: HasInterner</code></p>



<a name="189542727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189542727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189542727">(Mar 02 2020 at 22:05)</a>:</h4>
<p>and then a <code>T: HasInterner, U: HasInterner</code> on the <code>CastTo</code> impl</p>



<a name="189543025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189543025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189543025">(Mar 02 2020 at 22:08)</a>:</h4>
<p>okay</p>



<a name="189543245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189543245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189543245">(Mar 02 2020 at 22:11)</a>:</h4>
<p>in the cases where theres a T -&gt; U conversion which interner should I be using? I'm guessing they're the same interners and it doesnt matter so I'm defaulting to T::Interner.</p>



<a name="189543491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189543491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189543491">(Mar 02 2020 at 22:14)</a>:</h4>
<p>god i cant wait for implied bounds to be a thing</p>



<a name="189543499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189543499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189543499">(Mar 02 2020 at 22:14)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">HasInterner</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">TypeName</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
</pre></div>



<a name="189543501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189543501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189543501">(Mar 02 2020 at 22:14)</a>:</h4>
<p>shouldnt need this bound!</p>



<a name="189544492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544492">(Mar 02 2020 at 22:26)</a>:</h4>
<p>til derive(HasInterner)</p>



<a name="189544522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544522">(Mar 02 2020 at 22:27)</a>:</h4>
<p>i might be doing bad things that I'm asked to undo</p>



<a name="189544559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544559">(Mar 02 2020 at 22:27)</a>:</h4>
<p><a href="/user_uploads/4715/15PMDwC567NxmKYG0IxR4W_J/Screenshot-from-2020-03-02-14-27-40.png" target="_blank" title="Screenshot-from-2020-03-02-14-27-40.png">Screenshot-from-2020-03-02-14-27-40.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/15PMDwC567NxmKYG0IxR4W_J/Screenshot-from-2020-03-02-14-27-40.png" target="_blank" title="Screenshot-from-2020-03-02-14-27-40.png"><img src="/user_uploads/4715/15PMDwC567NxmKYG0IxR4W_J/Screenshot-from-2020-03-02-14-27-40.png"></a></div>



<a name="189544618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544618">(Mar 02 2020 at 22:28)</a>:</h4>
<p>is this too hacky??</p>



<a name="189544636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544636">(Mar 02 2020 at 22:28)</a>:</h4>
<p>I should just use the derive</p>



<a name="189544646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189544646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189544646">(Mar 02 2020 at 22:28)</a>:</h4>
<p>I'm gonna just use the derive</p>



<a name="189545502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545502">(Mar 02 2020 at 22:41)</a>:</h4>
<p>do we have a derive, I forget?</p>



<a name="189545529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545529">(Mar 02 2020 at 22:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189543245" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189543245">said</a>:</p>
<blockquote>
<p>in the cases where theres a T -&gt; U conversion which interner should I be using? I'm guessing they're the same interners and it doesnt matter so I'm defaulting to T::Interner.</p>
</blockquote>
<p>mmm I think you would use <code>U::Interner</code>, since presumably we are <em>creating</em> values of type <code>U</code></p>



<a name="189545531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545531">(Mar 02 2020 at 22:41)</a>:</h4>
<p>that said</p>



<a name="189545540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545540">(Mar 02 2020 at 22:41)</a>:</h4>
<p>I agree that we probably just want to use <code>cast_to</code> for cases where interner is the same</p>



<a name="189545595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545595">(Mar 02 2020 at 22:42)</a>:</h4>
<p>so really we probably want <code>U: HasInterner&lt;Interner = T::Interner&gt;</code></p>



<a name="189545629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545629">(Mar 02 2020 at 22:42)</a>:</h4>
<p>yea it was U</p>



<a name="189545636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545636">(Mar 02 2020 at 22:42)</a>:</h4>
<p>the compiler helped me out</p>



<a name="189545688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545688">(Mar 02 2020 at 22:43)</a>:</h4>
<p>yeah, though when we make <code>data</code> require an interner</p>



<a name="189545694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545694">(Mar 02 2020 at 22:43)</a>:</h4>
<p>I thikn we'll need them to be "equal"</p>



<a name="189545697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189545697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189545697">(Mar 02 2020 at 22:44)</a>:</h4>
<p>or else we'd have to pass two interners down</p>



<a name="189546691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189546691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189546691">(Mar 02 2020 at 22:58)</a>:</h4>
<p>okay</p>



<a name="189546692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189546692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189546692">(Mar 02 2020 at 22:58)</a>:</h4>
<p>can do</p>



<a name="189553480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553480">(Mar 03 2020 at 00:53)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="n">std</span>::<span class="n">iter</span>::<span class="n">FromIterator</span><span class="o">&lt;</span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">I</span>: <span class="nc">Interner</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">from_iter</span><span class="o">&lt;</span><span class="n">II</span><span class="o">&gt;</span><span class="p">(</span><span class="n">iter</span>: <span class="nc">II</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="n">II</span>: <span class="nb">IntoIterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Goal</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">iter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">into_iter</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">goal0</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">next</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">goal1</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iter</span><span class="p">.</span><span class="n">next</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="c1">// More than one goal to prove</span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">goals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Goals</span>::<span class="n">from</span><span class="p">(</span><span class="nb">Some</span><span class="p">(</span><span class="n">goal0</span><span class="p">).</span><span class="n">into_iter</span><span class="p">().</span><span class="n">chain</span><span class="p">(</span><span class="nb">Some</span><span class="p">(</span><span class="n">goal1</span><span class="p">)).</span><span class="n">chain</span><span class="p">(</span><span class="n">iter</span><span class="p">));</span><span class="w"></span>
<span class="w">                </span><span class="n">GoalData</span>::<span class="n">All</span><span class="p">(</span><span class="n">goals</span><span class="p">).</span><span class="n">intern</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="c1">// One goal to prove</span>
<span class="w">                </span><span class="n">goal0</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="c1">// No goals to prove, always true</span>
<span class="w">            </span><span class="n">GoalData</span>::<span class="n">All</span><span class="p">(</span><span class="n">Goals</span>::<span class="n">new</span><span class="p">()).</span><span class="n">intern</span><span class="p">()</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189553537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553537">(Mar 03 2020 at 00:54)</a>:</h4>
<p>so for the Goals and similar types I've been avoiding adding an interner member and have been threading it through via args</p>



<a name="189553550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553550">(Mar 03 2020 at 00:54)</a>:</h4>
<p>but now Goals::from needs an interner in this from_iter impl</p>



<a name="189553575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553575">(Mar 03 2020 at 00:54)</a>:</h4>
<p>I think that means that Goal would need to store a reference to its interner</p>



<a name="189553595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553595">(Mar 03 2020 at 00:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> / <span class="user-mention" data-user-id="232957">@Jack Huey</span> what do yall think?</p>



<a name="189553681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553681">(Mar 03 2020 at 00:56)</a>:</h4>
<p>in general interner is sneaking into a ton of fns called from</p>



<a name="189553685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553685">(Mar 03 2020 at 00:56)</a>:</h4>
<p>though none of them are associated with the From trait so its not thaat bad</p>



<a name="189553689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189553689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189553689">(Mar 03 2020 at 00:56)</a>:</h4>
<p>I did add interner to one without touching base but now I'm beginning to second guess</p>



<a name="189588213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189588213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189588213">(Mar 03 2020 at 12:30)</a>:</h4>
<p>Alternatively you could remove these <code>FromIterator</code> impls, and change the <code>collect()</code> calls to a function similar to the current <code>from_iter</code>, which also takes the interner</p>



<a name="189588696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189588696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189588696">(Mar 03 2020 at 12:37)</a>:</h4>
<p>Or create a wrapper to hold the interner, and implement FromIterator/From for that, but I don't think we need to do that yet</p>



<a name="189590895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189590895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189590895">(Mar 03 2020 at 13:12)</a>:</h4>
<p>Or just impl <code>FromIterator</code> for <code>GoalData</code>? Not <code>Goal</code>?</p>



<a name="189606591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189606591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189606591">(Mar 03 2020 at 16:03)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I expected to remove that <code>FromIterator</code> impl</p>



<a name="189606607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189606607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189606607">(Mar 03 2020 at 16:03)</a>:</h4>
<p>and make some method that takes an interner</p>



<a name="189606623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189606623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189606623">(Mar 03 2020 at 16:03)</a>:</h4>
<p>if we don't have it already</p>



<a name="189606650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189606650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189606650">(Mar 03 2020 at 16:03)</a>:</h4>
<p>e.g., <code>Goal::all(interner, impl Iterator&lt;Item= Goal&gt;)</code></p>



<a name="189606721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189606721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189606721">(Mar 03 2020 at 16:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189588213" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189588213">said</a>:</p>
<blockquote>
<p>Alternatively you could remove these <code>FromIterator</code> impls, and change the <code>collect()</code> calls to a function similar to the current <code>from_iter</code>, which also takes the interner</p>
</blockquote>
<p>basically what <span class="user-mention" data-user-id="125131">@detrumi</span> suggested &lt;3</p>



<a name="189608359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189608359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189608359">(Mar 03 2020 at 16:20)</a>:</h4>
<p>With <code>Interner</code> being <code>Copy</code>, should we be passing <code>I</code> around instead of <code>&amp;I</code>?</p>



<a name="189611877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189611877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189611877">(Mar 03 2020 at 16:57)</a>:</h4>
<p>/me thinks</p>



<a name="189611902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189611902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189611902">(Mar 03 2020 at 16:57)</a>:</h4>
<p>yeah, hmm, I don't know if <code>Interner</code> should be copy, that's maybe a problem</p>



<a name="189611985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189611985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189611985">(Mar 03 2020 at 16:58)</a>:</h4>
<p>same with clone</p>



<a name="189612031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612031">(Mar 03 2020 at 16:58)</a>:</h4>
<p>I guess this might be a problem with my argument about those bounds in general</p>



<a name="189612042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612042">(Mar 03 2020 at 16:58)</a>:</h4>
<p>Specifically I'm thinking about the rust-analyzer case, where I think <code>I</code> wants to be "the salsa database"</p>



<a name="189612092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612092">(Mar 03 2020 at 16:59)</a>:</h4>
<p>or at least the data you need to do interning is a ref to that database</p>



<a name="189612135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612135">(Mar 03 2020 at 16:59)</a>:</h4>
<p>it could be done by having</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Interner</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Interner</span><span class="p">;</span><span class="w"></span>

<span class="w">   </span><span class="k">fn</span> <span class="nf">intern</span><span class="p">(</span><span class="n">interner</span>: <span class="kp">&amp;</span><span class="nc">Self</span>::<span class="n">Interner</span><span class="p">,</span><span class="w"> </span><span class="p">...)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>instead of <code>&amp;self</code> methods, but that will be annoying.</p>



<a name="189612146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612146">(Mar 03 2020 at 16:59)</a>:</h4>
<p>Removing the <code>Copy</code> bound is a problem</p>



<a name="189612154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612154">(Mar 03 2020 at 17:00)</a>:</h4>
<p>I suppose we could make our own vesions of derive and remove all those bounds</p>



<a name="189612218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612218">(Mar 03 2020 at 17:00)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189612146" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/189612146">said</a>:</p>
<blockquote>
<p>Removing the <code>Copy</code> bound is a problem</p>
</blockquote>
<p>(currently)</p>



<a name="189612224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612224">(Mar 03 2020 at 17:00)</a>:</h4>
<p>i.e., versions that know now to add the bound to <code>I: Interner</code> parameters</p>



<a name="189612228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612228">(Mar 03 2020 at 17:00)</a>:</h4>
<p>right</p>



<a name="189612240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612240">(Mar 03 2020 at 17:00)</a>:</h4>
<p>As with all the other bounds</p>



<a name="189612265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612265">(Mar 03 2020 at 17:00)</a>:</h4>
<p>annoying :)</p>



<a name="189612280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612280">(Mar 03 2020 at 17:00)</a>:</h4>
<p>yeah</p>



<a name="189612288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612288">(Mar 03 2020 at 17:00)</a>:</h4>
<p>I wish we had a workaround for this with derive</p>



<a name="189612321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612321">(Mar 03 2020 at 17:01)</a>:</h4>
<p>even just being able to add <code>#[skip_derive]</code> to the parameter or something</p>



<a name="189612323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612323">(Mar 03 2020 at 17:01)</a>:</h4>
<p>it's unfortunate that <code>derive</code> requires that <code>I</code> have the bounds</p>



<a name="189612342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612342">(Mar 03 2020 at 17:01)</a>:</h4>
<p>yeah, we've been stalled on deciding the best fix for some time</p>



<a name="189612368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612368">(Mar 03 2020 at 17:01)</a>:</h4>
<p>definitely feels (to me) like a perfect enemy of good scenario</p>



<a name="189612377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612377">(Mar 03 2020 at 17:01)</a>:</h4>
<p>rather than acting more like auto traits where the derived impls have a <code>where &lt;fields&gt;: Trait</code></p>



<a name="189612394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612394">(Mar 03 2020 at 17:01)</a>:</h4>
<p>well, that's complicated</p>



<a name="189612413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612413">(Mar 03 2020 at 17:02)</a>:</h4>
<p>it would require all traits to be coinductive</p>



<a name="189612448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612448">(Mar 03 2020 at 17:02)</a>:</h4>
<p>which might be ok, but has other implications we'd have to work through</p>



<a name="189612479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612479">(Mar 03 2020 at 17:02)</a>:</h4>
<p>I know that's something you previously said you wanted</p>



<a name="189612480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612480">(Mar 03 2020 at 17:02)</a>:</h4>
<p>(notably it can create unsoundness when combined with supertraits and other forms of implied bounds, unless we fix them)</p>



<a name="189612491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612491">(Mar 03 2020 at 17:02)</a>:</h4>
<p>Yes, I do, but it's complicated and I don't know if it works :)</p>



<a name="189612495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612495">(Mar 03 2020 at 17:02)</a>:</h4>
<p>this is why I want it, though</p>



<a name="189612507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612507">(Mar 03 2020 at 17:02)</a>:</h4>
<p>this is also what I mean by "perfect enemy of good"</p>



<a name="189612520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612520">(Mar 03 2020 at 17:03)</a>:</h4>
<p>interesting</p>



<a name="189612523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612523">(Mar 03 2020 at 17:03)</a>:</h4>
<p>it's also (imo) a backwards incompatible change</p>



<a name="189612530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612530">(Mar 03 2020 at 17:03)</a>:</h4>
<p>admittedly one we could probably get away with</p>



<a name="189612570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612570">(Mar 03 2020 at 17:03)</a>:</h4>
<p>i.e.,</p>
<div class="codehilite"><pre><span></span><span class="cp">#[derive(Copy)]</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="n">T</span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>currently makes <code>Foo&lt;T&gt;</code> copy iff <code>T: Copy</code></p>



<a name="189612572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612572">(Mar 03 2020 at 17:03)</a>:</h4>
<p>and maybe you wanted that for some other reason</p>



<a name="189612637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612637">(Mar 03 2020 at 17:04)</a>:</h4>
<p>like <code>Foo</code> represents something that is not "logically" copy (unless <code>T: Copy</code>)</p>



<a name="189612645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612645">(Mar 03 2020 at 17:04)</a>:</h4>
<p>I'm not <em>that</em> worried about it</p>



<a name="189612649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612649">(Mar 03 2020 at 17:04)</a>:</h4>
<p>but it is true</p>



<a name="189612670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612670">(Mar 03 2020 at 17:04)</a>:</h4>
<p><code>derive2</code>???</p>



<a name="189612685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612685">(Mar 03 2020 at 17:04)</a>:</h4>
<p>/s</p>



<a name="189612697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612697">(Mar 03 2020 at 17:04)</a>:</h4>
<p>you could tie it to editions or something, too, or just say "give me one <em>real</em> example"</p>



<a name="189612707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612707">(Mar 03 2020 at 17:05)</a>:</h4>
<p>there may not even be one</p>



<a name="189612728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612728">(Mar 03 2020 at 17:05)</a>:</h4>
<p>anyway we don't have this stuff yet sooooo</p>



<a name="189612742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612742">(Mar 03 2020 at 17:05)</a>:</h4>
<p>I feel like that has the potential to be subtly wrong though :/</p>



<a name="189612807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612807">(Mar 03 2020 at 17:06)</a>:</h4>
<p>but yeah, off topic</p>



<a name="189612815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612815">(Mar 03 2020 at 17:06)</a>:</h4>
<p>as for <code>Interner</code>...</p>



<a name="189612821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189612821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189612821">(Mar 03 2020 at 17:06)</a>:</h4>
<p>I'm not sure</p>



<a name="189910955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189910955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189910955">(Mar 06 2020 at 16:43)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="p">,</span><span class="w"> </span><span class="n">TI</span>: <span class="nc">TargetInterner</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">Fold</span><span class="o">&lt;</span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="n">TI</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nb">Result</span> <span class="o">=</span><span class="w"> </span><span class="n">Substitution</span><span class="o">&lt;</span><span class="n">TI</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">fold_with</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">folder</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">dyn</span><span class="w"> </span><span class="n">Folder</span><span class="o">&lt;</span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="n">TI</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">Self</span>::<span class="nb">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="nb">Ok</span><span class="p">(</span><span class="n">Substitution</span>::<span class="n">from_fallible</span><span class="p">(</span><span class="n">folder</span><span class="p">.</span><span class="n">target_interner</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="bp">self</span><span class="p">.</span><span class="n">iter</span><span class="p">().</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">p</span><span class="o">|</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">fold_with</span><span class="p">(</span><span class="n">folder</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span><span class="p">)),</span><span class="w"></span>
<span class="w">        </span><span class="p">)</span><span class="o">?</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189911000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911000">(Mar 06 2020 at 16:44)</a>:</h4>
<p>this is running into borrowck issues because fold_with needs a &amp;mut ref to the folder but from_fallible also needs the target interner which borrows it with a shared ref</p>



<a name="189911079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911079">(Mar 06 2020 at 16:44)</a>:</h4>
<p>the only way I can think of to fix this is to break it up so that from_fallible takes the collected / interned version of what its doing internally</p>



<a name="189911106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911106">(Mar 06 2020 at 16:44)</a>:</h4>
<p>curious if theres a better way im not thinking of</p>



<a name="189911165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911165">(Mar 06 2020 at 16:45)</a>:</h4>
<p>also not even sure this will work</p>



<a name="189911269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911269">(Mar 06 2020 at 16:46)</a>:</h4>
<p>looks like i probably need to collect after the map</p>



<a name="189911328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911328">(Mar 06 2020 at 16:47)</a>:</h4>
<p>this works</p>



<a name="189911332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911332">(Mar 06 2020 at 16:47)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">folded</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">_</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">iter</span><span class="p">().</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="n">p</span><span class="o">|</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">fold_with</span><span class="p">(</span><span class="n">folder</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span><span class="p">)).</span><span class="n">collect</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="nb">Ok</span><span class="p">(</span><span class="n">Substitution</span>::<span class="n">from_fallible</span><span class="p">(</span><span class="n">folder</span><span class="p">.</span><span class="n">target_interner</span><span class="p">(),</span><span class="w"> </span><span class="n">folded</span><span class="p">)</span><span class="o">?</span><span class="p">)</span><span class="w"></span>
</pre></div>



<a name="189911340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911340">(Mar 06 2020 at 16:47)</a>:</h4>
<p>not sure if its an acceptable solution tho</p>



<a name="189911393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911393">(Mar 06 2020 at 16:48)</a>:</h4>
<p>I think we specifically wanted to avoid collecting into a Vec</p>



<a name="189911399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911399">(Mar 06 2020 at 16:48)</a>:</h4>
<p>yeaaaa</p>



<a name="189911415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911415">(Mar 06 2020 at 16:48)</a>:</h4>
<p>i guess we could pass the interner in</p>



<a name="189911427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911427">(Mar 06 2020 at 16:48)</a>:</h4>
<p>that would require changing the fold trait</p>



<a name="189911455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911455">(Mar 06 2020 at 16:49)</a>:</h4>
<p>or adding it as an arg to Goals, or making a wrapper type to run this</p>



<a name="189911497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911497">(Mar 06 2020 at 16:49)</a>:</h4>
<p>I'm gonna keep cleaning up errors and ill make sure to add a comment to the changes when i push the PR so yall can review it and lmk if you want a diff approach</p>



<a name="189911502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911502">(Mar 06 2020 at 16:49)</a>:</h4>
<p>or just lmk here</p>



<a name="189911811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189911811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189911811">(Mar 06 2020 at 16:52)</a>:</h4>
<p>Yeah, I'm not sure. I'll have to look into it later</p>



<a name="189912895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189912895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189912895">(Mar 06 2020 at 17:03)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/345/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/345/files">https://github.com/rust-lang/chalk/pull/345/files</a> sneak preview</p>



<a name="189912912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189912912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189912912">(Mar 06 2020 at 17:03)</a>:</h4>
<p>gonna have to stop for this morning now</p>



<a name="189969273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969273">(Mar 07 2020 at 12:36)</a>:</h4>
<p>Hmm</p>



<a name="189969277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969277">(Mar 07 2020 at 12:36)</a>:</h4>
<p>I <em>think</em> in rustc the equivalent of the <code>Folder</code> trait has a lifetime parameter, partly for this reason, so that it is something like</p>



<a name="189969284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969284">(Mar 07 2020 at 12:37)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Folder</span><span class="o">&lt;</span><span class="na">&#39;i</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="n">II</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">fn</span> <span class="nf">target_interner</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="na">&#39;i</span><span class="w"> </span><span class="n">II</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="189969286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969286">(Mar 07 2020 at 12:37)</a>:</h4>
<p>this would avoid the borrow check issue, because <code>target_interner()</code> no longer holds a borrow on <code>self</code></p>



<a name="189969289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969289">(Mar 07 2020 at 12:37)</a>:</h4>
<p>however, it'd also be kind of annoying :)</p>



<a name="189969330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969330">(Mar 07 2020 at 12:38)</a>:</h4>
<p>Yes, that is correct. <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/fold/trait.TypeFolder.html" target="_blank" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/fold/trait.TypeFolder.html"><code>TypeFolder</code></a> from rustc:</p>



<a name="189969332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969332">(Mar 07 2020 at 12:38)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">TypeFolder</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span>: <span class="nb">Sized</span> <span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">tcx</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">TyCtxt</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">..</span><span class="w"></span>
</pre></div>



<a name="189969333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969333">(Mar 07 2020 at 12:39)</a>:</h4>
<p>key point is that <code>'a</code> doesn't appear in the return type :)</p>



<a name="189969376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969376">(Mar 07 2020 at 12:40)</a>:</h4>
<p>I wonder how annoying that would actually be</p>



<a name="189969377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969377">(Mar 07 2020 at 12:40)</a>:</h4>
<p>We would have to change the various <code>&amp;mut Folder&lt;...</code> to <code>&amp;mut Folder&lt;'_, ...</code></p>



<a name="189969381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969381">(Mar 07 2020 at 12:41)</a>:</h4>
<p>and of course <code>impl Folder&lt;</code> but I think in all such cases they <em>have</em> a lifetime parameter already for the  <code>Interner</code></p>



<a name="189969386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189969386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189969386">(Mar 07 2020 at 12:41)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I think this is the right approach <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="189975241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189975241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189975241">(Mar 07 2020 at 15:52)</a>:</h4>
<p>That sounds like a good approach</p>



<a name="189975281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189975281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189975281">(Mar 07 2020 at 15:52)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="189987451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189987451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189987451">(Mar 07 2020 at 21:42)</a>:</h4>
<p>I think especially so since most of the <code>Folder</code> impls now had a lifetime right?</p>



<a name="189987459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/189987459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#189987459">(Mar 07 2020 at 21:42)</a>:</h4>
<p>Yea</p>



<a name="190024788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190024788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190024788">(Mar 08 2020 at 19:23)</a>:</h4>
<p>I started trying to add the lifetime param to folder but that ended up sneaking into the Fold trait and the SuperFold trait</p>



<a name="190024790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190024790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190024790">(Mar 08 2020 at 19:23)</a>:</h4>
<p>and that ended up breaking the Fold derive</p>



<a name="190024793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190024793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190024793">(Mar 08 2020 at 19:23)</a>:</h4>
<p>which is where I decided to stash and see if I could find some way to prevent needing to add a lifetime parameter to the other folding traits</p>



<a name="190024845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190024845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190024845">(Mar 08 2020 at 19:25)</a>:</h4>
<p>I think Fold derive should be easy enough to fix</p>



<a name="190025020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025020">(Mar 08 2020 at 19:30)</a>:</h4>
<p>okay</p>



<a name="190025022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025022">(Mar 08 2020 at 19:31)</a>:</h4>
<p>ill go with that approach then</p>



<a name="190025156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025156">(Mar 08 2020 at 19:35)</a>:</h4>
<p>do I have to add a lifetime param to every struct that implements Fold?</p>



<a name="190025157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025157">(Mar 08 2020 at 19:35)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="cp">#[derive(Clone, PartialEq, Eq, Hash, Fold, HasInterner)]</span><span class="w"></span>
<span class="sd">/// The set of assumptions we&#39;ve made so far, and the current number of</span>
<span class="sd">/// universal (forall) quantifiers we&#39;re within.</span>
<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Environment</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">clauses</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">ProgramClause</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="190025325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025325">(Mar 08 2020 at 19:41)</a>:</h4>
<p>Hmm wait why did Fold and SuperFold need a lifetime?</p>



<a name="190025391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025391">(Mar 08 2020 at 19:43)</a>:</h4>
<p>because they have Folders in their signatures</p>



<a name="190025428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025428">(Mar 08 2020 at 19:44)</a>:</h4>
<p>so if I try to add the necessary lifetime to an impl in Fold</p>



<a name="190025437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025437">(Mar 08 2020 at 19:44)</a>:</h4>
<p>so that it can verify that TI lives long enough, it no longer matches the trait impl</p>



<a name="190025656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025656">(Mar 08 2020 at 19:50)</a>:</h4>
<p>Sorry, on mobile so not entirely sure</p>



<a name="190025663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025663">(Mar 08 2020 at 19:50)</a>:</h4>
<p><a href="/user_uploads/4715/sSZgY9UFRAgdYp9Cxr3mu1PB/Screenshot-from-2020-03-08-12-50-48.png" target="_blank" title="Screenshot-from-2020-03-08-12-50-48.png">Screenshot-from-2020-03-08-12-50-48.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/sSZgY9UFRAgdYp9Cxr3mu1PB/Screenshot-from-2020-03-08-12-50-48.png" target="_blank" title="Screenshot-from-2020-03-08-12-50-48.png"><img src="/user_uploads/4715/sSZgY9UFRAgdYp9Cxr3mu1PB/Screenshot-from-2020-03-08-12-50-48.png"></a></div>



<a name="190025718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025718">(Mar 08 2020 at 19:52)</a>:</h4>
<p>yea this is getting kinda out of hand and I'm having trouble figuring out the derive macro</p>



<a name="190025720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025720">(Mar 08 2020 at 19:52)</a>:</h4>
<p>well</p>



<a name="190025721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025721">(Mar 08 2020 at 19:52)</a>:</h4>
<p>not so much having trouble</p>



<a name="190025726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025726">(Mar 08 2020 at 19:52)</a>:</h4>
<p>just that it seems like a lot of work so I want to put it off for now</p>



<a name="190025730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025730">(Mar 08 2020 at 19:53)</a>:</h4>
<p>I'm gonna back track to where I left off, which has the collect into Vec to avoid the lifetime issue</p>



<a name="190025731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025731">(Mar 08 2020 at 19:53)</a>:</h4>
<p>and try to clean up all the other issues</p>



<a name="190025734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190025734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190025734">(Mar 08 2020 at 19:53)</a>:</h4>
<p>then I'll revisit this when you're not on mobile</p>



<a name="190026551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190026551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190026551">(Mar 08 2020 at 20:20)</a>:</h4>
<p>But why would the Fold trait need the lifetime? Because Fold takes a &amp;mut dyn Folder? So the lifetime can be on the method</p>



<a name="190026617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190026617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190026617">(Mar 08 2020 at 20:22)</a>:</h4>
<p>Oh duh</p>



<a name="190026620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190026620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190026620">(Mar 08 2020 at 20:22)</a>:</h4>
<p>Wait no</p>



<a name="190026623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190026623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190026623">(Mar 08 2020 at 20:22)</a>:</h4>
<p>It's because I need to constrain TI in the fold impl</p>



<a name="190026637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190026637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190026637">(Mar 08 2020 at 20:23)</a>:</h4>
<p>I have to add a lifetime constraint to the target interner because of the default method impls on Folder that use the target_interner fn</p>



<a name="190027009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027009">(Mar 08 2020 at 20:34)</a>:</h4>
<p>Can you post a screenshot? Sorry</p>



<a name="190027269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027269">(Mar 08 2020 at 20:43)</a>:</h4>
<p><a href="/user_uploads/4715/FWU3tlj408O5GhPwXpUvyF33/Screenshot-from-2020-03-08-13-42-50.png" target="_blank" title="Screenshot-from-2020-03-08-13-42-50.png">Screenshot-from-2020-03-08-13-42-50.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/FWU3tlj408O5GhPwXpUvyF33/Screenshot-from-2020-03-08-13-42-50.png" target="_blank" title="Screenshot-from-2020-03-08-13-42-50.png"><img src="/user_uploads/4715/FWU3tlj408O5GhPwXpUvyF33/Screenshot-from-2020-03-08-13-42-50.png"></a></div>



<a name="190027277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027277">(Mar 08 2020 at 20:43)</a>:</h4>
<p>I should probably put the constraint on the trait</p>



<a name="190027279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027279">(Mar 08 2020 at 20:43)</a>:</h4>
<p>but I think the result will be the same</p>



<a name="190027318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027318">(Mar 08 2020 at 20:44)</a>:</h4>
<p>the impls for Fold will not compile because they dont have the same lifetime constraint</p>



<a name="190027506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027506">(Mar 08 2020 at 20:51)</a>:</h4>
<p>Hmm</p>



<a name="190027608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027608">(Mar 08 2020 at 20:54)</a>:</h4>
<p>I'm still missing exactly the problem <span aria-label="exhausted" class="emoji emoji-1f625" role="img" title="exhausted">:exhausted:</span></p>



<a name="190027875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027875">(Mar 08 2020 at 21:02)</a>:</h4>
<p>I'll just wait until later when I can focus more</p>



<a name="190027900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027900">(Mar 08 2020 at 21:03)</a>:</h4>
<p>Do you think you can push the changes with the lifetime on Folder? Even if it doesn't compile</p>



<a name="190027921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190027921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190027921">(Mar 08 2020 at 21:04)</a>:</h4>
<p>(It could be on a separate branch)</p>



<a name="190028921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190028921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190028921">(Mar 08 2020 at 21:37)</a>:</h4>
<p>sure</p>



<a name="190078152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190078152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190078152">(Mar 09 2020 at 15:02)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> where's the code, I can take a look</p>



<a name="190078239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190078239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190078239">(Mar 09 2020 at 15:03)</a>:</h4>
<p>is it part of <a href="https://github.com/rust-lang-nursery/chalk/issues/345" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/345">chalk#345</a>?</p>



<a name="190080494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190080494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190080494">(Mar 09 2020 at 15:23)</a>:</h4>
<p><a href="https://github.com/yaahc/chalk/tree/jane/fold" target="_blank" title="https://github.com/yaahc/chalk/tree/jane/fold">https://github.com/yaahc/chalk/tree/jane/fold</a></p>



<a name="190080520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190080520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190080520">(Mar 09 2020 at 15:23)</a>:</h4>
<p>this has at least one of the copies of the stuff I was fking with <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="190080643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190080643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190080643">(Mar 09 2020 at 15:24)</a>:</h4>
<p>it might be easier to start from the PR you linked tho and do the modification to the folder trait from scratch</p>



<a name="190080972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190080972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190080972">(Mar 09 2020 at 15:27)</a>:</h4>
<p>hmm, it seems like in part a shortcoming of rustc's implied bounds</p>



<a name="190081222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190081222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190081222">(Mar 09 2020 at 15:29)</a>:</h4>
<p>specifically, <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=441147aa4422e6e1c4fdfd0a2f8dd06b" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=441147aa4422e6e1c4fdfd0a2f8dd06b">this example</a> doesn't compile</p>



<a name="190081299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190081299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190081299">(Mar 09 2020 at 15:30)</a>:</h4>
<p>which means also that modifying <code>trait Folder</code> to <code>trait Folder&lt;'i, I: 'i, TI: 'i&gt;</code> doesn't you the defaults you would like.</p>



<a name="190081376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190081376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190081376">(Mar 09 2020 at 15:31)</a>:</h4>
<p>a bit surprising since <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=737330c78e09986191b50fea87a99a54" target="_blank" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=737330c78e09986191b50fea87a99a54">the same example with structs</a> does pass</p>



<a name="190082192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082192">(Mar 09 2020 at 15:37)</a>:</h4>
<p>_Shakes fist at one of the features that made me want to contribute to chalk in the first place_</p>



<a name="190082390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082390">(Mar 09 2020 at 15:39)</a>:</h4>
<p>so</p>



<a name="190082402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082402">(Mar 09 2020 at 15:39)</a>:</h4>
<p>we can update the signature of <code>fold_with</code></p>



<a name="190082412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082412">(Mar 09 2020 at 15:39)</a>:</h4>
<p>it will require modifying the deriving</p>



<a name="190082433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082433">(Mar 09 2020 at 15:39)</a>:</h4>
<p>but shouldn't be too hard</p>



<a name="190082522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082522">(Mar 09 2020 at 15:40)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">fold_with</span><span class="o">&lt;</span><span class="na">&#39;i</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">folder</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">dyn</span><span class="w"> </span><span class="n">Folder</span><span class="o">&lt;</span><span class="na">&#39;i</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="p">,</span><span class="w"> </span><span class="n">TI</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">binders</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Fallible</span><span class="o">&lt;</span><span class="n">Self</span>::<span class="nb">Result</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">        </span><span class="k">where</span><span class="w"> </span><span class="n">I</span>: <span class="na">&#39;i</span><span class="p">,</span><span class="w"> </span><span class="n">TI</span>: <span class="na">&#39;i</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="190082620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082620">(Mar 09 2020 at 15:40)</a>:</h4>
<p>the deriving code is in <a href="https://github.com/rust-lang/chalk/blob/master/chalk-derive/src/lib.rs" target="_blank" title="https://github.com/rust-lang/chalk/blob/master/chalk-derive/src/lib.rs">chalk-derive/src/lib.rs</a></p>



<a name="190082635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082635">(Mar 09 2020 at 15:41)</a>:</h4>
<p>there are various pieces of code where you'll find the <code>fold_with</code> signature that needs to be updated</p>



<a name="190082656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082656">(Mar 09 2020 at 15:41)</a>:</h4>
<p>e.g., <a href="https://github.com/rust-lang/chalk/blob/d6fd9efaccfd29bfd651d4a45c4708140c67de65/chalk-derive/src/lib.rs#L33-L39" target="_blank" title="https://github.com/rust-lang/chalk/blob/d6fd9efaccfd29bfd651d4a45c4708140c67de65/chalk-derive/src/lib.rs#L33-L39">here</a></p>



<a name="190082661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190082661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190082661">(Mar 09 2020 at 15:41)</a>:</h4>
<p>I think there are 3 in all</p>



<a name="190090681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190090681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190090681">(Mar 09 2020 at 16:46)</a>:</h4>
<p>okay</p>



<a name="190090685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190090685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190090685">(Mar 09 2020 at 16:46)</a>:</h4>
<p>that looks easy enough</p>



<a name="190099965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190099965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190099965">(Mar 09 2020 at 18:13)</a>:</h4>
<p>hopefully it's enough, but it should be</p>



<a name="190102422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190102422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190102422">(Mar 09 2020 at 18:34)</a>:</h4>
<p>woo porgress</p>



<a name="190102424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190102424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190102424">(Mar 09 2020 at 18:35)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/345/files" target="_blank" title="https://github.com/rust-lang/chalk/pull/345/files">https://github.com/rust-lang/chalk/pull/345/files</a></p>



<a name="190102462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190102462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190102462">(Mar 09 2020 at 18:35)</a>:</h4>
<p>I got the fold stuff done i think, still other errors to work through but I'm back on track</p>



<a name="190106788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190106788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190106788">(Mar 09 2020 at 19:16)</a>:</h4>
<p>and we're done!</p>



<a name="190106813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190106813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190106813">(Mar 09 2020 at 19:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="232957">@Jack Huey</span> the intern-param pr is ready for review</p>



<a name="190106921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190106921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190106921">(Mar 09 2020 at 19:18)</a>:</h4>
<p>also i checked off intern_lifetime in the tracking issue <a href="https://github.com/rust-lang/rust/issues/340" target="_blank" title="https://github.com/rust-lang/rust/issues/340">#340</a></p>



<a name="190106968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190106968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190106968">(Mar 09 2020 at 19:18)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/chalk/issues/340" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/340">chalk#340</a>*</p>



<a name="190107590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190107590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190107590">(Mar 09 2020 at 19:24)</a>:</h4>
<p>holy crap intern_goal was easy</p>



<a name="190107866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190107866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190107866">(Mar 09 2020 at 19:26)</a>:</h4>
<p>ahahahaha, intern_goals was like 4 lines</p>



<a name="190107871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190107871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190107871">(Mar 09 2020 at 19:26)</a>:</h4>
<p>its nice when it gets easy</p>



<a name="190108493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190108493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190108493">(Mar 09 2020 at 19:32)</a>:</h4>
<p>welp, I've officially finished all of the PRs for 340 not counting getting them thru review</p>



<a name="190111352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190111352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190111352">(Mar 09 2020 at 20:01)</a>:</h4>
<p>I've also got <a href="https://github.com/rust-lang/chalk/pull/342" target="_blank" title="https://github.com/rust-lang/chalk/pull/342">https://github.com/rust-lang/chalk/pull/342</a> compiling but I have some unresolved parts that I left as <code>unimplemented!()</code></p>



<a name="190111380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190111380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190111380">(Mar 09 2020 at 20:01)</a>:</h4>
<p>so if when either of you have time <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="232957">@Jack Huey</span> if you could take a look at that to lmk how to resolve those issues</p>



<a name="190202647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190202647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190202647">(Mar 10 2020 at 17:43)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> awesome! I left a minor suggestion on <a href="https://github.com/rust-lang-nursery/chalk/issues/345" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/345">chalk#345</a> (using <code>#[derive]</code>), do you think you'd have a chance to push those commits?</p>



<a name="190202696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190202696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190202696">(Mar 10 2020 at 17:44)</a>:</h4>
<p>I could maybe make the change too if that's inconvenient</p>



<a name="190203067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190203067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190203067">(Mar 10 2020 at 17:47)</a>:</h4>
<p>either is fine</p>



<a name="190203097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190203097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190203097">(Mar 10 2020 at 17:47)</a>:</h4>
<p>I'm looking rn</p>



<a name="190207781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190207781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190207781">(Mar 10 2020 at 18:27)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> the canonical one fails to compile with the derive</p>



<a name="190207897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190207897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190207897">(Mar 10 2020 at 18:28)</a>:</h4>
<p>I'd have to add a <code>T: HasInterner</code> bound to the generic</p>



<a name="190207902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190207902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190207902">(Mar 10 2020 at 18:28)</a>:</h4>
<p>which breaks other things</p>



<a name="190208014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190208014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190208014">(Mar 10 2020 at 18:29)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> ah ok nbd</p>



<a name="190208020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190208020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190208020">(Mar 10 2020 at 18:30)</a>:</h4>
<p>then leave it as is</p>



<a name="190208874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190208874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190208874">(Mar 10 2020 at 18:37)</a>:</h4>
<p>its been updated</p>



<a name="190208888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190208888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190208888">(Mar 10 2020 at 18:37)</a>:</h4>
<p>i also rebased the next commit in the chain, intern-goal</p>



<a name="190209038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190209038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190209038">(Mar 10 2020 at 18:39)</a>:</h4>
<p>and I shall continue to rebase until morale improves</p>



<a name="190212377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190212377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190212377">(Mar 10 2020 at 19:06)</a>:</h4>
<p>landed the first one</p>



<a name="190212381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190212381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190212381">(Mar 10 2020 at 19:06)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/chalk/issues/346" target="_blank" title="https://github.com/rust-lang-nursery/chalk/issues/346">chalk#346</a> looks good too</p>



<a name="190214149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190214149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190214149">(Mar 10 2020 at 19:24)</a>:</h4>
<p><em>opens up rust-lang/chalk to see 10 open PRs</em></p>



<a name="190214461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190214461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190214461">(Mar 10 2020 at 19:27)</a>:</h4>
<p>(it was 12 earlier today)</p>



<a name="190217257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190217257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190217257">(Mar 10 2020 at 19:55)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I think <a href="https://github.com/rust-lang/chalk/pull/347" target="_blank" title="https://github.com/rust-lang/chalk/pull/347">https://github.com/rust-lang/chalk/pull/347</a> needs to be rebased</p>



<a name="190218250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190218250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190218250">(Mar 10 2020 at 20:04)</a>:</h4>
<p>k <span class="user-mention" data-user-id="116009">@nikomatsakis</span>  i rebased 347 and the one after it</p>



<a name="190218348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190218348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190218348">(Mar 10 2020 at 20:05)</a>:</h4>
<p>just went and rebased all of them</p>



<a name="190218644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190218644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190218644">(Mar 10 2020 at 20:09)</a>:</h4>
<p>rgreat, merged all but the last, since CI wasn't done yet</p>



<a name="190225637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190225637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190225637">(Mar 10 2020 at 21:14)</a>:</h4>
<p>crap theres Debug bounds everywhere</p>



<a name="190226277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190226277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190226277">(Mar 10 2020 at 21:19)</a>:</h4>
<p>this is getting out of hand quickly X_X</p>



<a name="190226535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190226535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190226535">(Mar 10 2020 at 21:21)</a>:</h4>
<p>yea i think this just hit the point where its invalid without GATs</p>



<a name="190226669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190226669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190226669">(Mar 10 2020 at 21:21)</a>:</h4>
<p>nvm on figuring out how to do the display / debug stuff myself <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , the Zip and Fold traits both require : Debug</p>



<a name="190226748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190226748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190226748">(Mar 10 2020 at 21:22)</a>:</h4>
<p>and trying to change them to use TyDebug ended up spreading lifetime params throughout everywhere until eventually this needed one <code>        type InternedParameter = ParameterData&lt;'ty, ChalkIr&gt;;</code></p>



<a name="190226768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190226768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190226768">(Mar 10 2020 at 21:22)</a>:</h4>
<p>which is an unconstrainted parameter</p>



<a name="190227163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227163">(Mar 10 2020 at 21:26)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> yeah ok so the problem is basically that the <code>Debug</code> impls need to invoke <code>data</code>..?</p>



<a name="190227184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227184">(Mar 10 2020 at 21:26)</a>:</h4>
<p>yea</p>



<a name="190227192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227192">(Mar 10 2020 at 21:26)</a>:</h4>
<p>which takes an interner</p>



<a name="190227217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227217">(Mar 10 2020 at 21:26)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="cp">#[allow(unreachable_code, unused_variables)]</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Debug</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">fmt</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Formatter</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="p">(),</span><span class="w"> </span><span class="n">Error</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="n">write</span><span class="o">!</span><span class="p">(</span><span class="n">fmt</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;{:?}&quot;</span><span class="p">,</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">data</span><span class="p">(</span><span class="n">interner</span><span class="p">))</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="190227228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227228">(Mar 10 2020 at 21:26)</a>:</h4>
<p>so we <em>do</em> have an existing option of getting a callback from TLS</p>



<a name="190227253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227253">(Mar 10 2020 at 21:26)</a>:</h4>
<p>:S</p>



<a name="190227268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227268">(Mar 10 2020 at 21:27)</a>:</h4>
<p>/me thinks</p>



<a name="190227308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227308">(Mar 10 2020 at 21:27)</a>:</h4>
<p>we could add a new DebugLike trait that takes an interner</p>



<a name="190227322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227322">(Mar 10 2020 at 21:27)</a>:</h4>
<p>and change all the bounds everywhere to that</p>



<a name="190227333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227333">(Mar 10 2020 at 21:27)</a>:</h4>
<p>right, so basically have the option of a <code>DebugWith</code> trait</p>



<a name="190227336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227336">(Mar 10 2020 at 21:27)</a>:</h4>
<p>or TLS</p>



<a name="190227351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227351">(Mar 10 2020 at 21:28)</a>:</h4>
<p>or not support this form of interning</p>



<a name="190227395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227395">(Mar 10 2020 at 21:28)</a>:</h4>
<p>I'm not sure theres any reason to avoid TLS</p>



<a name="190227404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227404">(Mar 10 2020 at 21:28)</a>:</h4>
<p>i.e., you can only intern to an <code>&amp;TyData</code> sort of type</p>



<a name="190227411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227411">(Mar 10 2020 at 21:28)</a>:</h4>
<p>ultimately we need TLS anyway</p>



<a name="190227416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227416">(Mar 10 2020 at 21:28)</a>:</h4>
<p>aah okay</p>



<a name="190227419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227419">(Mar 10 2020 at 21:28)</a>:</h4>
<p>I'm thinking partly about rustc here</p>



<a name="190227431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227431">(Mar 10 2020 at 21:28)</a>:</h4>
<p>if we're already using tls then I would say just keep doing it</p>



<a name="190227454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227454">(Mar 10 2020 at 21:28)</a>:</h4>
<p>rather than refactoring everything to use a diff debug trait</p>



<a name="190227461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227461">(Mar 10 2020 at 21:28)</a>:</h4>
<p>sounds like an annoyingly huge refactor</p>



<a name="190227470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227470">(Mar 10 2020 at 21:29)</a>:</h4>
<p>we might want to change <em>how</em> we've integrated TLS</p>



<a name="190227471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227471">(Mar 10 2020 at 21:29)</a>:</h4>
<p>and we can always do it later</p>



<a name="190227488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190227488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190227488">(Mar 10 2020 at 21:29)</a>:</h4>
<p>okay</p>



<a name="190229157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229157">(Mar 10 2020 at 21:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay heres the next one</p>



<a name="190229163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229163">(Mar 10 2020 at 21:45)</a>:</h4>
<p>i need an interner here</p>



<a name="190229167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229167">(Mar 10 2020 at 21:45)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="sd">/// A fast check to see whether two things could ever possibly match.</span>
<span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">CouldMatch</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">could_match</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">other</span>: <span class="kp">&amp;</span><span class="nc">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="cp">#[allow(unreachable_code, unused_variables)]</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="n">CouldMatch</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">T</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">Zip</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">?</span><span class="nb">Sized</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">HasInterner</span><span class="o">&lt;</span><span class="n">Interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">I</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">I</span>: <span class="nc">Interner</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">could_match</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">other</span>: <span class="kp">&amp;</span><span class="nc">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">interner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">Zip</span>::<span class="n">zip_with</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">MatchZipper</span><span class="p">{</span><span class="w"> </span><span class="n">interner</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">other</span><span class="p">).</span><span class="n">is_ok</span><span class="p">();</span><span class="w"></span>
</pre></div>



<a name="190229178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229178">(Mar 10 2020 at 21:45)</a>:</h4>
<p>Should I add an arg to CouldMatch?</p>



<a name="190229280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229280">(Mar 10 2020 at 21:46)</a>:</h4>
<p>note Could match doesn't have an interner, so I would have to add a HasInterner bound to the struct</p>



<a name="190229500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190229500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190229500">(Mar 10 2020 at 21:48)</a>:</h4>
<p>went ahead and did that</p>



<a name="190230039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190230039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190230039">(Mar 10 2020 at 21:54)</a>:</h4>
<p>K i got intern-data passing all tests using tls</p>



<a name="190233801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233801">(Mar 10 2020 at 22:35)</a>:</h4>
<p>I just got to write some extremely exciting code</p>



<a name="190233812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233812">(Mar 10 2020 at 22:35)</a>:</h4>
<p>and by that I mean bad and I feel bad</p>



<a name="190233873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233873">(Mar 10 2020 at 22:36)</a>:</h4>
<p>it involves this bug</p>



<a name="190233876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233876">(Mar 10 2020 at 22:36)</a>:</h4>
<div class="codehilite"><pre><span></span>
</pre></div>



<a name="190233877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233877">(Mar 10 2020 at 22:36)</a>:</h4>
<p>warning: cannot borrow <code>*zipper</code> as mutable because it is also borrowed as immutable<br>
   --&gt; chalk-ir/src/zip.rs:334:23<br>
    |<br>
333 |         let interner = zipper.interner();<br>
    |                        ------ immutable borrow occurs here<br>
334 |         Zip::zip_with(zipper, a.data(interner), b.data(interner))<br>
    |                       ^^^^^^         -------- immutable borrow later used here<br>
    |                       |<br>
    |                       mutable borrow occurs here<br>
    |<br>
    = note: <code>#[warn(mutable_borrow_reservation_conflict)]</code> on by default<br>
    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future<br>
    = note: for more information, see issue <a href="https://github.com/rust-lang/rust/issues/59159" target="_blank" title="https://github.com/rust-lang/rust/issues/59159">#59159</a> &lt;<a href="https://github.com/rust-lang/rust/issues/59159" target="_blank" title="https://github.com/rust-lang/rust/issues/59159">https://github.com/rust-lang/rust/issues/59159</a>&gt;</p>



<a name="190233911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233911">(Mar 10 2020 at 22:36)</a>:</h4>
<p>I added the interner to zipper</p>



<a name="190233921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190233921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190233921">(Mar 10 2020 at 22:37)</a>:</h4>
<p>i think it needs a similar treatment to what the Folder trait got</p>



<a name="190289754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190289754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190289754">(Mar 11 2020 at 14:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190233921" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190233921">said</a>:</p>
<blockquote>
<p>i think it needs a similar treatment to what the Folder trait got</p>
</blockquote>
<p>yes</p>



<a name="190289755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190289755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190289755">(Mar 11 2020 at 14:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190229178" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190229178">said</a>:</p>
<blockquote>
<p>Should I add an arg to CouldMatch?</p>
</blockquote>
<p>yes</p>



<a name="190289772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190289772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190289772">(Mar 11 2020 at 14:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190230039" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190230039">said</a>:</p>
<blockquote>
<p>K i got intern-data passing all tests using tls</p>
</blockquote>
<p>neat! I'll have to check just what ya' did</p>



<a name="190916768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190916768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190916768">(Mar 17 2020 at 22:03)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> is there a reason not to merge the first of your PRs now?</p>



<a name="190916774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190916774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190916774">(Mar 17 2020 at 22:03)</a>:</h4>
<p>you said something about some tests not passing?</p>



<a name="190916816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190916816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190916816">(Mar 17 2020 at 22:04)</a>:</h4>
<p>(In particular, I feel like  we could address any changes to the TLS strategy in follow-up PRs)</p>



<a name="190917506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917506">(Mar 17 2020 at 22:11)</a>:</h4>
<p>let me check the first one</p>



<a name="190917614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917614">(Mar 17 2020 at 22:12)</a>:</h4>
<p>no <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , I think its good to merge</p>



<a name="190917633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917633">(Mar 17 2020 at 22:12)</a>:</h4>
<p>the test that was broken by lack of TLS is not affected by this change</p>



<a name="190917648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917648">(Mar 17 2020 at 22:12)</a>:</h4>
<p>the next PR in the change is the one that breaks the test</p>



<a name="190917659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917659">(Mar 17 2020 at 22:12)</a>:</h4>
<p>in the chain of prs i openned*</p>



<a name="190917664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917664">(Mar 17 2020 at 22:12)</a>:</h4>
<p>bah</p>



<a name="190917666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190917666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190917666">(Mar 17 2020 at 22:12)</a>:</h4>
<p>how to type</p>



<a name="190919463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190919463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190919463">(Mar 17 2020 at 22:33)</a>:</h4>
<p>OK!</p>



<a name="190920017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190920017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190920017">(Mar 17 2020 at 22:39)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> merged and <a href="https://github.com/rust-lang/chalk/pull/349#pullrequestreview-376453498" target="_blank" title="https://github.com/rust-lang/chalk/pull/349#pullrequestreview-376453498">left a comment</a> on how to address the test failures</p>



<a name="190920141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190920141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190920141">(Mar 17 2020 at 22:40)</a>:</h4>
<p>when you say get the program in scope what do you mean</p>



<a name="190925430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190925430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190925430">(Mar 17 2020 at 23:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay i finished all the interner stuff sans one problem with the "SeparatorTraitRef"</p>



<a name="190925479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190925479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190925479">(Mar 17 2020 at 23:46)</a>:</h4>
<p>which needs to have access to the program but is currently a private struct in chalk-ir</p>



<a name="190925487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190925487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190925487">(Mar 17 2020 at 23:46)</a>:</h4>
<p>I'm gonna go ahead and export it if there are no objections...</p>



<a name="190925775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190925775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190925775">(Mar 17 2020 at 23:50)</a>:</h4>
<p>part of me wants to just abandon all the older PRs and just combine them all into this last PR and merge it at once</p>



<a name="190925794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190925794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190925794">(Mar 17 2020 at 23:51)</a>:</h4>
<p>is the separation helping you review them <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ?</p>



<a name="190926881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190926881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190926881">(Mar 18 2020 at 00:06)</a>:</h4>
<p>k well I rebased them all and all tests should be passing now</p>



<a name="190926883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190926883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190926883">(Mar 18 2020 at 00:06)</a>:</h4>
<p>so it doesnt matter</p>



<a name="190926893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190926893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190926893">(Mar 18 2020 at 00:06)</a>:</h4>
<p>you can merge the last one to close all the earlier ones or merge them in order</p>



<a name="190980819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190980819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190980819">(Mar 18 2020 at 13:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190920141" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/190920141">said</a>:</p>
<blockquote>
<p>when you say get the program in scope what do you mean</p>
</blockquote>
<p>not sure if you figured this out already, <span class="user-mention" data-user-id="220273">@Jane Lusby</span>, but I meant code like this:</p>
<div class="codehilite"><pre><span></span><span class="n">tls</span>::<span class="n">with_current_program</span><span class="p">(...)</span><span class="w"></span>
</pre></div>


<p>this puts the program "in scope"</p>



<a name="190980825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190980825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190980825">(Mar 18 2020 at 13:41)</a>:</h4>
<p>er, sorry, that <em>accesses</em> the program in scope</p>



<a name="190980830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190980830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190980830">(Mar 18 2020 at 13:41)</a>:</h4>
<p>but there is some code that puts it in :)</p>



<a name="190980857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190980857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190980857">(Mar 18 2020 at 13:41)</a>:</h4>
<p>but i'm happy with the other fix for now</p>



<a name="190999336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/190999336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#190999336">(Mar 18 2020 at 15:45)</a>:</h4>
<p>coolio</p>



<a name="191020550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191020550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191020550">(Mar 18 2020 at 18:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> once you've reviewed and merged the last few PRs I think I'm ready for guidance on the builtin types issue</p>



<a name="191095034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191095034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191095034">(Mar 19 2020 at 10:40)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> merged the PRs but left <a href="https://github.com/rust-lang/chalk/pull/353#discussion_r394930949" target="_blank" title="https://github.com/rust-lang/chalk/pull/353#discussion_r394930949">one bit of follow-up</a></p>



<a name="191122076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191122076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191122076">(Mar 19 2020 at 14:38)</a>:</h4>
<p>That seems an easy follow-up, mind me have a try?</p>



<a name="191122798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191122798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191122798">(Mar 19 2020 at 14:43)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/355" target="_blank" title="https://github.com/rust-lang/chalk/pull/355">https://github.com/rust-lang/chalk/pull/355</a></p>



<a name="191151931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191151931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191151931">(Mar 19 2020 at 17:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116458">@Charles Lew</span> thanks! Your PR looks right, but <a href="https://github.com/rust-lang/chalk/pull/355#pullrequestreview-377964414" target="_blank" title="https://github.com/rust-lang/chalk/pull/355#pullrequestreview-377964414">doesn't handle all the cases yet</a> -- want to add the rest?</p>



<a name="191199691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191199691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191199691">(Mar 20 2020 at 03:18)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/pull/355#issuecomment-601507783" target="_blank" title="https://github.com/rust-lang/chalk/pull/355#issuecomment-601507783">https://github.com/rust-lang/chalk/pull/355#issuecomment-601507783</a></p>



<a name="191780878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191780878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191780878">(Mar 25 2020 at 17:15)</a>:</h4>
<p>So, I feel like there's something...off...about the current <code>Interner</code> representation</p>



<a name="191780913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191780913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191780913">(Mar 25 2020 at 17:16)</a>:</h4>
<p>specifically with respect to <code>Debug</code>, at least right now</p>



<a name="191780993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191780993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191780993">(Mar 25 2020 at 17:16)</a>:</h4>
<p>let's look at <code>ty_data</code>/<code>Ty</code>/<code>TyData</code> for a second</p>



<a name="191781038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781038">(Mar 25 2020 at 17:16)</a>:</h4>
<p>so there's this method: <code>fn ty_data&lt;'a&gt;(&amp;self, ty: &amp;'a Self::InternedType) -&gt; &amp;'a TyData&lt;Self&gt;;</code></p>



<a name="191781113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781113">(Mar 25 2020 at 17:17)</a>:</h4>
<p>and this</p>
<div class="codehilite"><pre><span></span>pub struct Ty&lt;I: Interner&gt; {
    interned: I::InternedType,
}
</pre></div>



<a name="191781191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781191">(Mar 25 2020 at 17:17)</a>:</h4>
<p>and this </p>
<div class="codehilite"><pre><span></span>pub fn data(&amp;self, interner: &amp;I) -&gt; &amp;TyData&lt;I&gt; {
        I::ty_data(interner, &amp;self.interned)
}
</pre></div>



<a name="191781341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781341">(Mar 25 2020 at 17:18)</a>:</h4>
<p>then, if we look at this method <code>fn debug_ty(ty: &amp;Ty&lt;Self&gt;, fmt: &amp;mut fmt::Formatter&lt;'_&gt;) -&gt; Option&lt;fmt::Result&gt;;</code></p>



<a name="191781452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781452">(Mar 25 2020 at 17:19)</a>:</h4>
<p>What <em>should</em> the body of the function there look like</p>



<a name="191781467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781467">(Mar 25 2020 at 17:19)</a>:</h4>
<p>assuming we don't use TLS</p>



<a name="191781478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781478">(Mar 25 2020 at 17:19)</a>:</h4>
<p>or, don't want to</p>



<a name="191781600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781600">(Mar 25 2020 at 17:20)</a>:</h4>
<p>i think</p>



<a name="191781602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781602">(Mar 25 2020 at 17:20)</a>:</h4>
<p>wait sec</p>



<a name="191781614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781614">(Mar 25 2020 at 17:20)</a>:</h4>
<p>so, there's sort of two (maybe three) representations of <code>InternedType</code></p>



<a name="191781663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781663">(Mar 25 2020 at 17:21)</a>:</h4>
<p>So 1) <code>I::InternedType = &amp;'tcx TyData&lt;I&gt;</code></p>



<a name="191781744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781744">(Mar 25 2020 at 17:21)</a>:</h4>
<p>2) <code>I::InternedType = usize</code>, then we need the <code>&amp;self: Interner</code> to convert <code>usize -&gt; &amp;'tcx TyData&lt;I&gt;</code></p>



<a name="191781813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781813">(Mar 25 2020 at 17:22)</a>:</h4>
<p>(then 3 is <code>I::InternedType = Box&lt;TyData&lt;I&gt;&gt;</code>)</p>



<a name="191781911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191781911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191781911">(Mar 25 2020 at 17:22)</a>:</h4>
<p>right now though, no implementations go with option 2</p>



<a name="191782100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782100">(Mar 25 2020 at 17:24)</a>:</h4>
<p>so, theoretically, if we made <code>interned</code> on <code>Ty</code> pub, then <code>debug_ty</code> can just call <code>write!(fmt, "{:?}", ty.interned)</code></p>



<a name="191782189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782189">(Mar 25 2020 at 17:24)</a>:</h4>
<p>now, that alone I'm not sure is...the best</p>



<a name="191782232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782232">(Mar 25 2020 at 17:25)</a>:</h4>
<p>which just makes me feel like maybe the design is a bit off</p>



<a name="191782324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782324">(Mar 25 2020 at 17:25)</a>:</h4>
<p>for path 2) how do you go from a usize to a tyData?</p>



<a name="191782405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782405">(Mar 25 2020 at 17:26)</a>:</h4>
<p>is that how rust would do it</p>



<a name="191782411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782411">(Mar 25 2020 at 17:26)</a>:</h4>
<p>rustc*</p>



<a name="191782448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782448">(Mar 25 2020 at 17:26)</a>:</h4>
<p>The usize could be a key to a hashmap on <code>Interner</code></p>



<a name="191782473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782473">(Mar 25 2020 at 17:26)</a>:</h4>
<p>no, rustc just passes around a <code>&amp;'tcx TyData</code></p>



<a name="191782509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782509">(Mar 25 2020 at 17:27)</a>:</h4>
<p>i see</p>



<a name="191782525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782525">(Mar 25 2020 at 17:27)</a>:</h4>
<p>i mean more like</p>



<a name="191782526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782526">(Mar 25 2020 at 17:27)</a>:</h4>
<p>this is <code>ty_data</code> on the rustc interner:</p>
<div class="codehilite"><pre><span></span>    fn ty_data&lt;&#39;a&gt;(&amp;self, ty: &amp;&#39;a Self::InternedType) -&gt; &amp;&#39;a chalk_ir::TyData&lt;Self&gt; {
        ty
    }
</pre></div>



<a name="191782558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782558">(Mar 25 2020 at 17:27)</a>:</h4>
<p>so a different interner could implement their ty_data fn that way</p>



<a name="191782567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782567">(Mar 25 2020 at 17:27)</a>:</h4>
<p>but its not implemented that way anywhere in chalk rn</p>



<a name="191782577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782577">(Mar 25 2020 at 17:27)</a>:</h4>
<p>correct</p>



<a name="191782647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782647">(Mar 25 2020 at 17:28)</a>:</h4>
<p>okay that makes sense</p>



<a name="191782653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782653">(Mar 25 2020 at 17:28)</a>:</h4>
<p>(and I don't think rust-analyzer interns types by usize)</p>



<a name="191782790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782790">(Mar 25 2020 at 17:29)</a>:</h4>
<p>maybe just making <code>interned</code> on <code>Ty</code> <code>pub</code> is the right action</p>



<a name="191782967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782967">(Mar 25 2020 at 17:30)</a>:</h4>
<p>my very naive familiarity with the code makes me feel like maybe that should be the fallback path from here</p>



<a name="191782973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191782973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191782973">(Mar 25 2020 at 17:30)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">impl</span><span class="o">&lt;</span><span class="n">I</span>: <span class="nc">Interner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Debug</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;</span><span class="n">I</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">fmt</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Formatter</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="p">(),</span><span class="w"> </span><span class="n">Error</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">I</span>::<span class="n">debug_ty</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">unwrap_or_else</span><span class="p">(</span><span class="o">||</span><span class="w"> </span><span class="n">unimplemented</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;cannot format Ty without setting Program in tls&quot;</span><span class="p">))</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="191783042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191783042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191783042">(Mar 25 2020 at 17:30)</a>:</h4>
<p>where you could default to trying to let the interner lookup the tydata from the ty, and fall back to using the member if the interner isnt available</p>



<a name="191783249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191783249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191783249">(Mar 25 2020 at 17:32)</a>:</h4>
<p>so you mean add a separate <code>fn try_ty_data(&amp;I::InternedType) -&gt; Option&lt;&amp;TyData&lt;I&gt;&gt;;</code>?</p>



<a name="191783399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191783399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191783399">(Mar 25 2020 at 17:33)</a>:</h4>
<p>I mean, if you make <code>interned</code> pub, then <code>debug_ty</code> becomes</p>
<div class="codehilite"><pre><span></span>    fn debug_ty(
        _ty: &amp;chalk_ir::Ty&lt;Self&gt;,
        _fmt: &amp;mut fmt::Formatter&lt;&#39;_&gt;
    ) -&gt; Option&lt;fmt::Result&gt; {
        Some(write!(_fmt, &quot;{:?}&quot;, _ty.interned))
    }
</pre></div>



<a name="191784895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784895">(Mar 25 2020 at 17:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191783249" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191783249">said</a>:</p>
<blockquote>
<p>so you mean add a separate <code>fn try_ty_data(&amp;I::InternedType) -&gt; Option&lt;&amp;TyData&lt;I&gt;&gt;;</code>?</p>
</blockquote>
<p>I don't think this is necessary, we already have the path that returns an Option here</p>



<a name="191784903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784903">(Mar 25 2020 at 17:42)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">        </span><span class="k">fn</span> <span class="nf">debug_ty</span><span class="p">(</span><span class="n">ty</span>: <span class="kp">&amp;</span><span class="nc">Ty</span><span class="o">&lt;</span><span class="n">ChalkIr</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">fmt</span>::<span class="n">Formatter</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">fmt</span>::<span class="nb">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">tls</span>::<span class="n">with_current_program</span><span class="p">(</span><span class="o">|</span><span class="n">prog</span><span class="o">|</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">prog</span><span class="o">?</span><span class="p">.</span><span class="n">debug_ty</span><span class="p">(</span><span class="n">ty</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">)))</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="191784947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784947">(Mar 25 2020 at 17:42)</a>:</h4>
<p>and im still thinking about the codepath where we could have a usize</p>



<a name="191784970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784970">(Mar 25 2020 at 17:42)</a>:</h4>
<p>like, if I::InternedType was a usize we wouldn't want to log that right?</p>



<a name="191784981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784981">(Mar 25 2020 at 17:43)</a>:</h4>
<p>we'd prefer to lookup the ty_data</p>



<a name="191784999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191784999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191784999">(Mar 25 2020 at 17:43)</a>:</h4>
<p>yes, but that takes a <code>Ty</code>, not an <code>InternedType</code></p>



<a name="191785019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785019">(Mar 25 2020 at 17:43)</a>:</h4>
<p>Right</p>



<a name="191785179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785179">(Mar 25 2020 at 17:44)</a>:</h4>
<p>so right now it works by taking in a ty, checking if we have an interner, if we do then we get the ty_data and use that to print with the assumption that it will have more info than our InternedType</p>



<a name="191785204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785204">(Mar 25 2020 at 17:44)</a>:</h4>
<p>and if we dont have an interner we would want to format the internedtype</p>



<a name="191785225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785225">(Mar 25 2020 at 17:44)</a>:</h4>
<p>But, essentially, it would be up  to the interner <em>in <code>debug_ty</code></em> to decide if it wants to 1) debug without looking up data 2) Lookup data (with tls, or just with <code>interned</code>)</p>



<a name="191785234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785234">(Mar 25 2020 at 17:44)</a>:</h4>
<p>which is already the TyData in all codepaths we use</p>



<a name="191785264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785264">(Mar 25 2020 at 17:44)</a>:</h4>
<p>ooh</p>



<a name="191785292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785292">(Mar 25 2020 at 17:44)</a>:</h4>
<p>you want to switch it up so the interner can avoid the TLS lookup?</p>



<a name="191785347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785347">(Mar 25 2020 at 17:45)</a>:</h4>
<p>Well, yes</p>



<a name="191785351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785351">(Mar 25 2020 at 17:45)</a>:</h4>
<p>rustc I don't think we want to use tls for sure</p>



<a name="191785525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785525">(Mar 25 2020 at 17:46)</a>:</h4>
<p>(and actually, fixing this would mean we no longer need tls for debugging in some cases. Only if we need state not stored in the <code>Ty</code> (like names))</p>



<a name="191785617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785617">(Mar 25 2020 at 17:46)</a>:</h4>
<p>okay I can get behind this</p>



<a name="191785655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785655">(Mar 25 2020 at 17:46)</a>:</h4>
<p>so long as someone who is using a usize doesnt just end up only getting numbers for their debug repr</p>



<a name="191785715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785715">(Mar 25 2020 at 17:47)</a>:</h4>
<p>but because debug_ty is a trait method for Interner they can define that how they want</p>



<a name="191785724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785724">(Mar 25 2020 at 17:47)</a>:</h4>
<p>because they know how they interned it</p>



<a name="191785744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785744">(Mar 25 2020 at 17:47)</a>:</h4>
<p>I think i've finally caught up to what you mean</p>



<a name="191785784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785784">(Mar 25 2020 at 17:47)</a>:</h4>
<p>sounds like a good plan</p>



<a name="191785855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785855">(Mar 25 2020 at 17:48)</a>:</h4>
<p>to me at least</p>



<a name="191785902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785902">(Mar 25 2020 at 17:48)</a>:</h4>
<p>great</p>



<a name="191785932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785932">(Mar 25 2020 at 17:48)</a>:</h4>
<p>the only thing I'm skeptical of is making <code>interned</code> pub</p>



<a name="191785979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191785979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191785979">(Mar 25 2020 at 17:49)</a>:</h4>
<p>but it's...probably fine</p>



<a name="191786058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786058">(Mar 25 2020 at 17:49)</a>:</h4>
<p>is it a mutability concern?</p>



<a name="191786072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786072">(Mar 25 2020 at 17:50)</a>:</h4>
<p>like someone modifying the interned type?</p>



<a name="191786114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786114">(Mar 25 2020 at 17:50)</a>:</h4>
<p>accidentally*</p>



<a name="191786142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786142">(Mar 25 2020 at 17:50)</a>:</h4>
<p>we could force them to go thru a method that borrows it</p>



<a name="191786543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786543">(Mar 25 2020 at 17:53)</a>:</h4>
<p>yeah</p>



<a name="191786642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191786642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191786642">(Mar 25 2020 at 17:54)</a>:</h4>
<p>yeah, we could make a <code>fn interned(&amp;self: Ty&lt;I&gt;) -&gt; &amp;I::InternedType</code></p>



<a name="191799335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191799335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191799335">(Mar 25 2020 at 19:28)</a>:</h4>
<p>So, another case where we need to have the interner around for debugging is for debugging aliases</p>



<a name="191799377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191799377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191799377">(Mar 25 2020 at 19:28)</a>:</h4>
<p>since we need to know types of trait vs associated types</p>



<a name="191806706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191806706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191806706">(Mar 25 2020 at 20:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191782405" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191782405">said</a>:</p>
<blockquote>
<p>is that how rust would do it</p>
</blockquote>
<p>this is how salsa would do it</p>



<a name="191806814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191806814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191806814">(Mar 25 2020 at 20:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191784970" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191784970">said</a>:</p>
<blockquote>
<p>like, if I::InternedType was a usize we wouldn't want to log that right?</p>
</blockquote>
<p>I'm not sure, I think it would be "ok" to log that</p>



<a name="191806892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191806892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191806892">(Mar 25 2020 at 20:29)</a>:</h4>
<p>I think the idea of "fallback to dumping the interned representation" is ok, but we should also try to have the interner available via TLS.</p>



<a name="191806946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191806946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191806946">(Mar 25 2020 at 20:30)</a>:</h4>
<p>That said, hmm,</p>



<a name="191806977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191806977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191806977">(Mar 25 2020 at 20:30)</a>:</h4>
<p>so if we wanted to give up on using a <code>usize</code>, and require that the data be <em>some</em> sort of pointer, you certainly could make life a bit easier, but it is kind of a drag,</p>



<a name="191807004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807004">(Mar 25 2020 at 20:30)</a>:</h4>
<p>in particular it means that you can't have <code>Copy</code> types unless you use arena allocation like rustc</p>



<a name="191807070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807070">(Mar 25 2020 at 20:31)</a>:</h4>
<p>I considered e.g. in Lark using <code>Arc</code> to represent the types, but it means we have to maintain a ref-count, and using a <code>usize</code> felt better (while still avoiding lifetimes, which has some advantages)</p>



<a name="191807099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807099">(Mar 25 2020 at 20:31)</a>:</h4>
<p>I guess I feel like I'm not ready to give up on the ability to use a usize yet</p>



<a name="191807117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807117">(Mar 25 2020 at 20:31)</a>:</h4>
<p>but I like the "fallback to logging the interned repr"</p>



<a name="191807140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807140">(Mar 25 2020 at 20:32)</a>:</h4>
<p>it's not what you <em>want</em>, but in some contexts it might be ok, and it's better than nothing</p>



<a name="191807189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191807189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191807189">(Mar 25 2020 at 20:32)</a>:</h4>
<p>there's nothing worse than debug logs panicking</p>



<a name="191811707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191811707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191811707">(Mar 25 2020 at 21:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I didn't get the impression that jack wanted to give up on usize</p>



<a name="191811749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191811749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191811749">(Mar 25 2020 at 21:12)</a>:</h4>
<p>just that he wanted to change the <code>debug_ty</code> impl for <code>ChalkIR</code> to not use the interner in tls and just go directly to the Interned type because we're not using usize</p>



<a name="191811939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191811939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191811939">(Mar 25 2020 at 21:14)</a>:</h4>
<p>like debug_ty would still return Option&lt;fmt::Result&gt; and allow for the TLS + fallback paths, but we can skip it for interners where we know we dont need to lookup the tydata</p>



<a name="191891439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191891439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191891439">(Mar 26 2020 at 14:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191811749" title="#narrow/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328/near/191811749">said</a>:</p>
<blockquote>
<p>just that he wanted to change the <code>debug_ty</code> impl for <code>ChalkIR</code> to not use the interner in tls and just go directly to the Interned type because we're not using usize</p>
</blockquote>
<p>ok, that seems fine</p>



<a name="191891488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191891488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191891488">(Mar 26 2020 at 14:24)</a>:</h4>
<p>if the fallback is to dump the "interned" repr, then it could even just return <code>None</code></p>



<a name="191891530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191891530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191891530">(Mar 26 2020 at 14:25)</a>:</h4>
<p>Oo</p>



<a name="191891534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191891534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191891534">(Mar 26 2020 at 14:25)</a>:</h4>
<p>Yeee</p>



<a name="191944456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191944456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191944456">(Mar 26 2020 at 20:30)</a>:</h4>
<p>ok well I think I will merge <a href="https://github.com/rust-lang/chalk/pull/355" title="https://github.com/rust-lang/chalk/pull/355">https://github.com/rust-lang/chalk/pull/355</a> by <span class="user-mention" data-user-id="116458">@Charles Lew</span> -- but it seems like there might be some "follow-up work" here?</p>



<a name="191944504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191944504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191944504">(Mar 26 2020 at 20:30)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> maybe you want to add some notes to <a href="https://github.com/rust-lang/chalk/issues/341" title="https://github.com/rust-lang/chalk/issues/341">https://github.com/rust-lang/chalk/issues/341</a> about this?</p>



<a name="191944825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191944825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191944825">(Mar 26 2020 at 20:33)</a>:</h4>
<p>yes, I'll do that later today</p>



<a name="191944841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/adding%20context%20to%20%60TypeFamily%60%20chalk%23328/near/191944841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/adding.20context.20to.20.60TypeFamily.60.20chalk.23328.html#191944841">(Mar 26 2020 at 20:33)</a>:</h4>
<p>that PR looks good to me, definitely more followup</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>